mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-03-15 15:31:05 +00:00
run tests in node
This commit is contained in:
parent
5dba619a24
commit
d474df546f
@ -1,14 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: './jest-patched-jsdom.js',
|
||||
testEnvironment: 'node',
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user