imageFilenames and imageFilename, backend integration tests, frontend tests, removed username references
This commit is contained in:
25
frontend/jest.env.js
Normal file
25
frontend/jest.env.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const JSDOMEnvironment = require('jest-environment-jsdom').default;
|
||||
const { TextEncoder, TextDecoder } = require('util');
|
||||
|
||||
class CustomEnvironment extends JSDOMEnvironment {
|
||||
constructor(config, context) {
|
||||
super(config, context);
|
||||
|
||||
// Add polyfills to global before any test code runs
|
||||
this.global.TextEncoder = TextEncoder;
|
||||
this.global.TextDecoder = TextDecoder;
|
||||
|
||||
// BroadcastChannel polyfill
|
||||
this.global.BroadcastChannel = class BroadcastChannel {
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
postMessage() {}
|
||||
close() {}
|
||||
addEventListener() {}
|
||||
removeEventListener() {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CustomEnvironment;
|
||||
Reference in New Issue
Block a user