meteor setting for jest test with meteor packages and mocking them WAD-7097
Showing
... | @@ -58,6 +58,7 @@ | ... | @@ -58,6 +58,7 @@ |
"less": "^3.10.3", | "less": "^3.10.3", | ||
"less-loader": "^5.0.0", | "less-loader": "^5.0.0", | ||
"material-design-icons-iconfont": "^5.0.1", | "material-design-icons-iconfont": "^5.0.1", | ||
"meteor-jest-stubs": "^2.0.0", | |||
"sass": "^1.22.9", | "sass": "^1.22.9", | ||
"sass-loader": "^7.2.0", | "sass-loader": "^7.2.0", | ||
"uglifyjs-webpack-plugin": "^2.2.0", | "uglifyjs-webpack-plugin": "^2.2.0", | ||
... | @@ -84,17 +85,20 @@ | ... | @@ -84,17 +85,20 @@ |
], | ], | ||
"moduleNameMapper": { | "moduleNameMapper": { | ||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", | "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", | ||
"\\.(css|less)$": "identity-obj-proxy" | "\\.(css|less)$": "identity-obj-proxy", | ||
"^meteor/(.*)": "<rootDir>/__mock__/.meteorMocks/index.js" | |||
}, | }, | ||
"transform": { | "transform": { | ||
"^.+\\.js$": "<rootDir>/node_modules/babel-jest", | "^.+\\.js$": "<rootDir>/node_modules/babel-jest", | ||
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest" | ".*\\.(vue)$": "<rootDir>/node_modules/vue-jest" | ||
}, | }, | ||
"collectCoverage": true, | "collectCoverage": true, | ||
"collectCoverageFrom": [ | "collectCoverageFrom": [ | ||
"**/*.{js,vue}", | "**/*.{js,vue}", | ||
"!**/node_modules/**", | "!**/node_modules/**", | ||
"!**/coverage/**" | "!**/coverage/**", | ||
"!**/__mock__/**" | |||
] | ] | ||
} | } | ||
} | } | ||
\ No newline at end of file |
Please
register
or
sign in
to comment