mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-05 02:10:18 +00:00
9aa077eb4b
* Migrate to the new version of air-interpreter package * Add pipeline with integration tests * Fix issues which prevented tests to finish normally
15 lines
521 B
JavaScript
15 lines
521 B
JavaScript
const Environment = require('jest-environment-jsdom');
|
|
|
|
module.exports = class CustomTestEnvironment extends Environment {
|
|
async setup() {
|
|
await super.setup();
|
|
if (typeof this.global.TextEncoder === 'undefined') {
|
|
const { TextEncoder, TextDecoder } = require('util');
|
|
this.global.TextEncoder = TextEncoder;
|
|
this.global.TextDecoder = TextDecoder;
|
|
this.global.Uint8Array = Uint8Array;
|
|
this.global.ArrayBuffer = ArrayBuffer;
|
|
}
|
|
}
|
|
};
|