Skip to content

Commit 90beb06

Browse files
committed
test: add bootstrap file to allow for umd import
1 parent 58535a9 commit 90beb06

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/bootstrap.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Stub out CommonJS for tests
2+
window.module = {exports: {}}
3+
window.exports = module.exports
4+
window.require = Function.prototype

test/karma.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function reply(request, response, next) {
2525
module.exports = function(config) {
2626
config.set({
2727
frameworks: ['mocha', 'chai'],
28-
files: ['../dist/umd/index.js', 'test.js'],
28+
files: ['bootstrap.js', '../dist/umd/index.js', 'test.js'],
2929
reporters: ['mocha'],
3030
port: 9876,
3131
colors: true,

0 commit comments

Comments
 (0)