Skip to content

Commit

Permalink
Convert test bundle to be an ES module
Browse files Browse the repository at this point in the history
This should make it easier to speed up test runs in future by
pre-building npm dependencies into a separate bundle which the main test
bundle can import from.
  • Loading branch information
robertknight committed Oct 15, 2021
1 parent f72de5b commit 53da403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions rollup-tests.config.js
Expand Up @@ -11,8 +11,7 @@ export default {
input: 'build/scripts/test-inputs.js', // Input file generated by gulp task
output: {
file: 'build/scripts/tests.bundle.js',
format: 'iife',
name: 'testsBundle', // This just exists to suppress a build warning.
format: 'es',
sourcemap: true,
},
treeshake: false,
Expand Down
2 changes: 1 addition & 1 deletion src/karma.config.js
Expand Up @@ -55,7 +55,7 @@ module.exports = function (config) {
{ pattern: './annotator/test/empty.html', watched: false },

// Test bundles.
'../build/scripts/tests.bundle.js',
{ pattern: '../build/scripts/tests.bundle.js', type: 'module' },

// Sourcemaps for test bundles.
{ pattern: '../build/scripts/*.js.map', included: false },
Expand Down

0 comments on commit 53da403

Please sign in to comment.