feat (tests): Added headless test for github workflows (#5)
Co-authored-by: Pratik Bhattacharya <pratikb@microsoft.com>
This commit is contained in:
Родитель
0150378879
Коммит
08ad5e7599
|
@ -9,6 +9,9 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
|
|||
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
|
||||
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
|
||||
|
||||
If you are adding new features please add unit test cases. For the modification of any existing feature
|
||||
ensure all existing test cases are running.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
@ -0,0 +1,61 @@
|
|||
module.exports = function (config) {
|
||||
config.set({
|
||||
frameworks: ["jasmine", "karma-typescript"],
|
||||
files: [
|
||||
{ pattern: "src/**/*.ts" },
|
||||
{ pattern: "test/**/*.ts" }
|
||||
],
|
||||
preprocessors: {
|
||||
"src/**/*.ts": ["karma-typescript"],
|
||||
"test/**/*.ts": "karma-typescript"
|
||||
},
|
||||
reporters: ["progress"],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessCustom: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox', '--disable-gpu']
|
||||
}
|
||||
},
|
||||
browsers: ["ChromeHeadlessCustom"],
|
||||
karmaTypescriptConfig: {
|
||||
coverageReporter: {
|
||||
instrumenterOptions: {
|
||||
istanbul: { noCompact: true }
|
||||
}
|
||||
},
|
||||
bundlerOptions: {
|
||||
transforms: [
|
||||
require("karma-typescript-es6-transform")({
|
||||
presets: [
|
||||
["env", {
|
||||
targets: {
|
||||
chrome: "60"
|
||||
}
|
||||
}]
|
||||
]
|
||||
})
|
||||
]
|
||||
},
|
||||
compilerOptions: {
|
||||
module: "commonjs",
|
||||
sourceMap: true,
|
||||
target: "es6",
|
||||
allowJs: false,
|
||||
declaration: true,
|
||||
moduleResolution: "node",
|
||||
skipLibCheck: true,
|
||||
lib: ["es2017", "DOM"],
|
||||
downlevelIteration: true
|
||||
},
|
||||
typeRoots: [
|
||||
"node_modules/@types"
|
||||
],
|
||||
exclude: [
|
||||
"node_modules/**/*"
|
||||
]
|
||||
},
|
||||
singleRun: true,
|
||||
autoWatch: false,
|
||||
plugins: ['karma-jasmine', 'karma-chrome-launcher', 'karma-typescript']
|
||||
});
|
||||
};
|
14
package.json
14
package.json
|
@ -9,7 +9,15 @@
|
|||
"url": "https://www.devcompost.com/"
|
||||
},
|
||||
"homepage": "https://github.com/microsoft/redux-micro-frontend",
|
||||
"keywords": ["redux", "micro frontend", "microfrontend", "microfrontends", "micro frontends", "state", "statemanagement"],
|
||||
"keywords": [
|
||||
"redux",
|
||||
"micro frontend",
|
||||
"microfrontend",
|
||||
"microfrontends",
|
||||
"micro frontends",
|
||||
"state",
|
||||
"statemanagement"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/microsoft/redux-micro-frontend/issues",
|
||||
"email": "pratikb@microsoft.com"
|
||||
|
@ -20,7 +28,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "karma start karma.conf.js",
|
||||
"test-chrome": "karma start karma.conf.js",
|
||||
"test": "karma start karma.conf.headless.js",
|
||||
"release:pre": "npm run build && npm version prerelease && npm run copyfiles:publish-beta",
|
||||
"release:patch": "npm run build && npm version patch && npm run copyfiles:publish",
|
||||
"release:minor": "npm run build && npm version minor && npm run copyfiles:publish",
|
||||
|
@ -48,6 +57,7 @@
|
|||
"karma-jasmine": "^3.3.1",
|
||||
"karma-typescript": "^4.1.1",
|
||||
"karma-typescript-es6-transform": "^4.1.1",
|
||||
"puppeteer": "^5.5.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"typescript": "^3.5.3"
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче