diff --git a/karma.conf.js b/karma.conf.js index e5bcbccdf..35515414a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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 @@ -26,7 +26,7 @@ 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: { @@ -34,11 +34,11 @@ module.exports = function(config) { 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, @@ -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, @@ -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 @@ -80,5 +80,5 @@ module.exports = function(config) { // Concurrency level // how many browser should be started simultaneous concurrency: 1 - }) -} + }); +}; diff --git a/package.json b/package.json index 63e807c35..2668ca364 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "notifier" ], "peerDependencies": { - "cross-fetch": "2.2.x" + "cross-fetch": ">=2" }, "devDependencies": { "@types/chai": "4.1.7",