forked from johngodley/redirection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
18 lines (17 loc) · 760 Bytes
/
Copy pathjest.config.js
File metadata and controls
18 lines (17 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const defaultConfig = require( '@wordpress/scripts/config/jest-unit.config.js' );
module.exports = {
...defaultConfig,
moduleNameMapper: {
...defaultConfig.moduleNameMapper,
'^@wp-plugin-lib/api-fetch/api-method$': '<rootDir>/src/__mocks__/@wp-plugin-lib/api-method.ts',
'^@wp-plugin-lib/api-fetch$': '<rootDir>/src/__mocks__/@wp-plugin-lib/api-fetch.ts',
'^@wp-plugin-lib$': '<rootDir>/src/wp-plugin-lib',
'^@wp-plugin-components$': '<rootDir>/src/wp-plugin-components',
'^lib/(.*)$': '<rootDir>/src/lib/$1',
'^component/(.*)$': '<rootDir>/src/component/$1',
'^state/(.*)$': '<rootDir>/src/state/$1',
'^page/(.*)$': '<rootDir>/src/page/$1',
'^stores/(.*)$': '<rootDir>/src/stores/$1',
'^types/(.*)$': '<rootDir>/src/types/$1',
},
};