Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Jan 10, 2019
1 parent 5028f9a commit 313d954
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const path = require('path')
const webpack = require('webpack')
const webpackConfig = require('./webpack.config')[0]
const path = require("path");
const webpack = require("webpack");
const webpackConfig = require("./webpack.config")[0];

process.env.CHROME_BIN = require('puppeteer').executablePath()
process.env.CHROME_BIN = require("puppeteer").executablePath();

module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
basePath: "",

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'sinon-chai'],
frameworks: ["mocha", "sinon-chai"],

// list of files / patterns to load in the browser
files: ['src/internal/compat.ts', 'test/unit/**/*_test.ts'],
files: ["test/unit/**/*_test.ts"],

mime: {
'text/x-typescript': ['ts', 'tsx']
"text/x-typescript": ["ts", "tsx"]
},

// list of files to exclude
Expand All @@ -26,19 +26,19 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'**/*.ts': ['webpack', 'sourcemap']
"**/*.ts": ["webpack", "sourcemap"]
},

webpack: {
resolve: webpackConfig.resolve,
module: webpackConfig.module,
externals: webpackConfig.externals,

devtool: 'inline-source-map',
devtool: "inline-source-map",

plugins: [
new webpack.DefinePlugin({
VERSION: '"1.0.0"'
VERSION: '"0.0.0"'
}),
new webpack.SourceMapDevToolPlugin({
filename: null,
Expand All @@ -48,13 +48,13 @@ module.exports = function(config) {
},

webpackMiddleware: {
stats: 'errors-only'
stats: "errors-only"
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['spec'],
reporters: ["spec"],

// web server port
port: 9876,
Expand All @@ -71,7 +71,7 @@ module.exports = function(config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless'],
browsers: ["ChromeHeadless"],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand All @@ -80,5 +80,5 @@ module.exports = function(config) {
// Concurrency level
// how many browser should be started simultaneous
concurrency: 1
})
}
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"notifier"
],
"peerDependencies": {
"cross-fetch": "2.2.x"
"cross-fetch": ">=2"
},
"devDependencies": {
"@types/chai": "4.1.7",
Expand Down

0 comments on commit 313d954

Please sign in to comment.