Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

269 changes: 0 additions & 269 deletions .eslintrc.js

This file was deleted.

21 changes: 0 additions & 21 deletions .jsdocrc

This file was deleted.

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"mochaExplorer.files": "test/*.ts",
"mochaExplorer.require": "mocha.test.bootsrap.js"
}
63 changes: 23 additions & 40 deletions config/karma/karma-base.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,25 @@
const path = require('path');
const webpackConfig = require('../webpack');
const webpackConfig = require("./webpack.karma");

/* eslint no-process-env:0 */
process.env.CHROME_BIN = require('puppeteer').executablePath();

// Deleting output.library to avoid "Uncaught SyntaxError: Unexpected token /" error
// when running testes (var test/foo_test.js = ...)
delete webpackConfig.output.library;

// Code coverage
webpackConfig.module.rules.push({
test: /\.js$/,
include: path.resolve('./src/'),
loader: 'istanbul-instrumenter-loader',
query: {
esModules: true
}
});
process.env.CHROME_BIN = require("puppeteer").executablePath();

module.exports = {
basePath: '../../',
frameworks: ['mocha'],
reporters: ['progress', 'coverage'],
files: [
'test/**/*_test.js'
],
basePath: "../../",
frameworks: ["mocha"],
reporters: ["progress", "coverage"],
files: ["test/**/*_test.ts"],

plugins: [
'karma-webpack',
'karma-mocha',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-coverage'
"karma-webpack",
"karma-mocha",
"karma-chrome-launcher",
"karma-firefox-launcher",
"karma-coverage",
],

preprocessors: {
'src/**/*.js': ['webpack'],
'test/**/*_test.js': ['webpack']
"src/**/*.ts": ["webpack"],
"test/**/*_test.ts": ["webpack"],
},

webpack: webpackConfig,
Expand All @@ -46,17 +29,17 @@ module.exports = {
stats: {
chunks: false,
timings: false,
errorDetails: true
}
errorDetails: true,
},
},

coverageReporter: {
dir: './coverage',
dir: "./coverage",
reporters: [
{type: 'html', subdir: 'html'},
{type: 'lcov', subdir: '.'},
{type: 'text', subdir: '.', file: 'text.txt'},
{type: 'text-summary', subdir: '.', file: 'text-summary.txt'}
]
}
};
{ type: "html", subdir: "html" },
{ type: "lcov", subdir: "." },
{ type: "text", subdir: ".", file: "text.txt" },
{ type: "text-summary", subdir: ".", file: "text-summary.txt" },
],
},
};
Loading