I am having an issue running my unit tests with Karma and its interaction with RequireJS.
I get this error:
'There is no timestamp for /base/bower_components/web/app/services/FooFactoryService.js!' Empty test suite.
As I understand, I must set this to NOT be included, so RequireJS can include it itself manually. My issue is that I have to specify exactly this file to get the tests running again. Wildcards and upper folders do not work, so far as I can see.
Here are my files in karma.conf.js - This one WORKS. As soon as I touch the first pattern, it breaks.
files:
[
...
{pattern: 'bower_components/**/**/**/FooFactoryService.js', included: false},
{pattern: 'bower_components/**/*.js', included: false},
{pattern: 'bower_components/**/*.json', included: false},
{pattern: 'bower_components/**/*.html', included: false},
...
],
This works. But if I put a * in place of FooFactoryService.js, or just remove the line entirely and count on 'bower_components/**/*.js', I get the empty test suite error. If I move the line down beneath those three lines, it also fails. It needs to be above them, and it needs to specify the file.
Why does it require me to specify this exact file? Why do wildcards not hit it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire