Skip to content

Commit

Permalink
chore: ready for 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed May 29, 2019
1 parent be34194 commit 9a5fab7
Show file tree
Hide file tree
Showing 5 changed files with 1,347 additions and 4,105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/
.DS_Store
doc/
dist/
demo/dist/
release/
npm-debug.log*
coverage/
Expand Down
106 changes: 53 additions & 53 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
module.exports = function(config) {
const karmaConfig = {
frameworks: ["mocha", "chai", "karma-typescript"],
mime: {
'text/x-typescript': ['ts','tsx']
},
client: {
mocha: {
opts: "./mocha.opts",
},
},
files: [
"./src/**/*.ts",
"./test/**/*.ts",
// "./test/**/*.spec.ts",
],
preprocessors: {
"src/**/*.ts": ["karma-typescript"],
"test/**/*.ts": ["karma-typescript"],
},
karmaTypescriptConfig: {
tsconfig: "./tsconfig.test.json",
reports: {
html: {
"directory": "coverage",
"subdirectory": "./"
},
lcovonly: {
"directory": "coverage",
"filename": "lcov.info",
"subdirectory": "."
},
},
coverageOptions: {
instrumentation: true,
exclude: /test/i,
},
},
browsers: [],
customLaunchers: {
CustomChromeHeadless: {
base: "ChromeHeadless",
flags: ["--window-size=400,300", "--no-sandbox", "--disable-setuid-sandbox"],
},
},
reporters: ["mocha"],
};
module.exports = function (config) {
const karmaConfig = {
frameworks: ["mocha", "chai", "karma-typescript"],
mime: {
'text/x-typescript': ['ts', 'tsx']
},
client: {
mocha: {
opts: "./mocha.opts",
},
},
files: [
"./src/**/*.ts",
"./test/**/*.ts",
// "./test/**/*.spec.ts",
],
preprocessors: {
"src/**/*.ts": ["karma-typescript"],
"test/**/*.ts": ["karma-typescript"],
},
karmaTypescriptConfig: {
tsconfig: "./tsconfig.test.json",
reports: {
html: {
"directory": "coverage",
"subdirectory": "./"
},
lcovonly: {
"directory": "coverage",
"filename": "lcov.info",
"subdirectory": "."
},
},
coverageOptions: {
instrumentation: true,
exclude: /test/i,
},
},
browsers: [],
customLaunchers: {
CustomChromeHeadless: {
base: "ChromeHeadless",
flags: ["--window-size=400,300", "--no-sandbox", "--disable-setuid-sandbox"],
},
},
reporters: ["mocha"],
};

karmaConfig.browsers.push(config.chrome ? "Chrome" : "CustomChromeHeadless");
karmaConfig.browsers.push(config.chrome ? "Chrome" : "CustomChromeHeadless");

if (config.coverage) {
karmaConfig.reporters.push("karma-typescript");
karmaConfig.singleRun = true;
}
if (config.coverage) {
karmaConfig.reporters.push("karma-typescript");
karmaConfig.singleRun = true;
}

config.set(karmaConfig);
config.set(karmaConfig);
};
Loading

0 comments on commit 9a5fab7

Please sign in to comment.