mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Visual Console Client: added mocks to the test runner
Former-commit-id: 239ef3cff19026884bac8f70a101d8d8dc95d34d
This commit is contained in:
parent
d76f00ec9b
commit
cb04947ca2
1
visual_console/__mocks__/fileMock.js
Normal file
1
visual_console/__mocks__/fileMock.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = "test-file-stub";
|
1
visual_console/__mocks__/styleMock.js
Normal file
1
visual_console/__mocks__/styleMock.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = {};
|
@ -4,5 +4,12 @@ module.exports = {
|
|||||||
"^.+\\.tsx?$": "ts-jest"
|
"^.+\\.tsx?$": "ts-jest"
|
||||||
},
|
},
|
||||||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
||||||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
||||||
|
// This configuration is used to mock the css and file imports used by Webpack.
|
||||||
|
// https://jestjs.io/docs/en/webpack.html
|
||||||
|
moduleNameMapper: {
|
||||||
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
||||||
|
"<rootDir>/__mocks__/fileMock.js",
|
||||||
|
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user