mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
update file mock to return file name
This commit is contained in:
parent
90d1ab88b1
commit
a670a73fd0
@ -1 +1,7 @@
|
||||
module.exports = 'test-file-stub';
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
process (src, filename) {
|
||||
return `module.exports=${JSON.stringify(path.basename(filename))};`;
|
||||
},
|
||||
};
|
||||
|
||||
@ -3,7 +3,6 @@ module.exports = {
|
||||
'src/**/*.{js,jsx}'
|
||||
],
|
||||
moduleNameMapper: {
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
||||
'\\.(css|scss|less)$': '<rootDir>/__mocks__/styleMock.js'
|
||||
},
|
||||
setupTestFrameworkScriptFile: '<rootDir>/jest.setup.js',
|
||||
@ -13,7 +12,8 @@ module.exports = {
|
||||
testEnvironment: 'jsdom',
|
||||
testURL: 'http://127.0.0.1:3001',
|
||||
transform: {
|
||||
'^.+\\.(js|jsx)$': 'babel-jest'
|
||||
'^.+\\.(js|jsx)$': 'babel-jest',
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'[/\\\\]node_modules[/\\\\].+\\.(?!(axios)/)(js|jsx)$'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user