Skip to content

Commit 98f551f

Browse files
committed
Update readme with information on karma modules status
1 parent 217a8e9 commit 98f551f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 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-
Starting version *unreleased* Karma properly supports ES6 modules when running in a suitable environment. 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+
Karma can natively run ES6 modules when using 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 path with relative ones as well as adding extensions if necessary allowing for native ES6 modules testing without compiling or bundling.
88

@@ -50,7 +50,7 @@ import Foo from './foo.js';
5050
import Bar from 'alias/bar.js';
5151
```
5252

53-
### `aliases`
53+
#### `aliases`
5454

5555
Default value: `{}`
5656

@@ -71,7 +71,7 @@ import Foo from 'alias/foo';
7171
import Foo from '../relative/from/current/file/alias-root/foo';
7272
```
7373

74-
### `customResolver`
74+
#### `customResolver`
7575
Default value: `null`
7676

7777
A function to be called instead of normal rewriting.
@@ -94,3 +94,8 @@ import Foo from 'foo';
9494
// Rewrites to
9595
import Foo from 'http://example.com/foo';
9696
```
97+
98+
## Karma module support
99+
As of version 3.0.0 Karma has limited support of modules: It can integrated it, 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.
100+
101+
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.

0 commit comments

Comments
 (0)