Skip to content

Commit 0bd0f80

Browse files
committed
Update karma peerDependency to version with proper modules support
1 parent 5463d95 commit 0bd0f80

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[Karma](http://karma-runner.github.io) preprocessor to resolve ES6 modules.
33

44
## The problem
5-
Karma can natively run ES6 modules when running in a suitable environment (a modern browser). Browsers module implementation is limited however to local modules (i.e. `./foo.js`) and browsers will not resolve paths missing extension leaving that to the server.
5+
Starting version `3.1.0` Karma can natively run ES6 modules when running in a suitable environment (a modern browser). Browsers module implementation is limited however to local modules (i.e. `./foo.js`) and browsers will not resolve paths missing extension leaving that to the server.
66

77
This preprocessor solves both problems by rewriting import declarations on the fly and replacing aliased paths with absolute ones as well as adding extensions if necessary allowing for native ES6 modules testing without compiling or bundling.
88

@@ -95,8 +95,3 @@ import Foo from 'foo';
9595
// Rewrites to
9696
import Foo from 'http://example.com/foo';
9797
```
98-
99-
## Karma ES6 modules support
100-
As of version `3.0.0` Karma has limited support of modules: It can integrate them, but there's [a bug](https://github.com/karma-runner/karma/issues/2955) preventing tests described in modules from running. It is fixed in develop branch, but there's no release with the fix and no information on when it's going to be available.
101-
102-
There are some workarounds for the issue: Using `customContextFile` to substitute `3.0.0` `context.html` with a newer one and delaying `__karma__.loaded` call until DOM `load` event. See Karma GitHub for details.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
"espree": "^4.0.0"
3434
},
3535
"peerDependencies": {
36-
"karma": "^3.0.0"
36+
"karma": "^3.1.0"
3737
}
3838
}

0 commit comments

Comments
 (0)