We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fca8c04 commit af01ffbCopy full SHA for af01ffb
jest.config.js
@@ -0,0 +1,16 @@
1
+const baseConfig = require('@wordpress/scripts/config/jest-unit.config.js');
2
+
3
+module.exports = {
4
+ ...baseConfig,
5
+ preset: 'ts-jest',
6
+ testEnvironment: 'jsdom',
7
+ setupFilesAfterEnv: [
8
+ './jest.setup.js'
9
+ ],
10
+ transform: {
11
+ '^.+\\.jsx?$': 'babel-jest',
12
+ },
13
+ moduleNameMapper: {
14
+ 'uuid': require.resolve('uuid'),
15
16
+};
jest.setup.js
@@ -0,0 +1,3 @@
+import '@testing-library/jest-dom';
+import '@testing-library/jest-dom/extend-expect.js';
+import '@wordpress/jest-preset-default/scripts/setup-globals';
0 commit comments