Skip to content

Commit

Permalink
import all modules in a test run to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hoefling committed Sep 9, 2018
1 parent 0ac98f1 commit 05d7b14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['mocha', 'chai'],
files: ['tests/**/*.spec.ts'],
files: ['tests/test.ts', 'tests/**/*.spec.ts'],
exclude: [],
mime: {
'text/x-typescript': ['ts', 'tsx']
Expand Down
6 changes: 6 additions & 0 deletions tests/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file is an attempt to achieve true code coverage values.
// See https://stackoverflow.com/questions/51790353/
declare const require: any;

const ctx = require.context('../src', true, /\.ts$/);
ctx.keys().map(ctx);

0 comments on commit 05d7b14

Please sign in to comment.