Visual Console Client: added mocks to the test runner

Former-commit-id: 239ef3cff19026884bac8f70a101d8d8dc95d34d
This commit is contained in:
Alejandro Gallardo Escobar 2019-03-05 16:12:32 +01:00
parent d76f00ec9b
commit cb04947ca2
3 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1 @@
module.exports = "test-file-stub";

View File

@ -0,0 +1 @@
module.exports = {};

View File

@ -4,5 +4,12 @@ module.exports = {
"^.+\\.tsx?$": "ts-jest"
},
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"
}
};