Skip to content

Commit a6d9be1

Browse files
committed
Add regenerator-runtime to unit test karma config
The compiled test files use async/await which Babel transpiles to use regeneratorRuntime. This runtime needs to be loaded before the tests execute, otherwise tests fail with 'regeneratorRuntime is not defined'.
1 parent 797a029 commit a6d9be1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/unit/karma.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = config => {
88

99
basePath: "../../",
1010
files: [
11+
"node_modules/regenerator-runtime/runtime.js",
1112
"test/compiled/unit/loadGlobals.js",
1213
{
1314
pattern: "test/compiled/unit/asyncImportHelper.js",

0 commit comments

Comments
 (0)