Skip to content

Commit

Permalink
Build system: set up hook for tests (prebid#9350)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored and jorgeluisrocha committed May 18, 2023
1 parent 319c569 commit 1727e10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = function(codeCoverage, browserstack, watchMode, file, disableFe
var webpackConfig = newWebpackConfig(codeCoverage, disableFeatures);
var plugins = newPluginsArray(browserstack);

var files = file ? ['test/test_deps.js', file].flatMap(f => f) : ['test/test_index.js'];
var files = file ? ['test/test_deps.js', file, 'test/helpers/hookSetup.js'].flatMap(f => f) : ['test/test_index.js'];
// This file opens the /debug.html tab automatically.
// It has no real value unless you're running --watch, and intend to do some debugging in the browser.
if (watchMode) {
Expand Down
5 changes: 5 additions & 0 deletions test/helpers/hookSetup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {hook} from '../../src/hook.js';

before(() => {
hook.ready();
});

0 comments on commit 1727e10

Please sign in to comment.