mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
Added missing configs to fixt tests with Jest 28
This commit is contained in:
12
config/jest/cssTransform.js
Normal file
12
config/jest/cssTransform.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// This is a custom Jest transformer turning style imports into empty objects.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process() {
|
||||
return { code: 'module.exports = {};' };
|
||||
},
|
||||
getCacheKey() {
|
||||
// The output is always the same.
|
||||
return 'cssTransform';
|
||||
},
|
||||
};
|
||||
@@ -24,6 +24,8 @@ module.exports = {
|
||||
};`;
|
||||
}
|
||||
|
||||
return `module.exports = ${assetFilename};`;
|
||||
return {
|
||||
code: `module.exports = ${assetFilename};`
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
4
config/jest/setupBeforeEnzyme.js
Normal file
4
config/jest/setupBeforeEnzyme.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as util from 'util';
|
||||
|
||||
global.TextEncoder = util.TextEncoder;
|
||||
global.TextDecoder = util.TextDecoder;
|
||||
Reference in New Issue
Block a user