Open santaclauze opened 7 years ago
I have the same bug here.
When the path is too long the .test.js
file simply got ignored.
I fixed it by creating a FIX
directory in every parents of my ignored tests, then by manually importing the test with require.
Could we tag this as bug ?
I created a proof of concept to reproduce the issue and was unable to:
https://gist.github.com/twolfson/979d5f0975c64a790abca5003363336c
Could you provide more info about your karma.conf.js
? I might have something configured differently than you which is causing the issue =/
I've had similar problems with file names where karma simply would not load the file for testing (karma 1.71, windows 10, node 8). For instance, I had a file named app.directive.js
that wouldn't get loaded until I renamed it to something without the string app
in the name. I'm using simple glob patterns in my karma.conf.js file.
'app/**/*.module.js',
'app/**/*.js',
If you could submit a PR with tests on the preprocessor spec that demonstrate these pattern match failures, we could begin to diagnose this across multiple OSes - pattern matching has had some cross-compatibility issues.
I am using Karma with a React boiler plate. Testing has been fine so far, but i encountered an issue where Karma simply skips a directory.
The directory is built in the same way as all other tested directories, the only notable difference that I was able to identify was that the length of the path seemed to enable or disable the Testing.
Expected behaviour
Test directory
backoffice/app/components/bootstrap/atoms/CardDeckWrapper/tests/index.tests.js
Actual behaviour
Tests skips the file!
Steps to reproduce the behaviour
CardDeckWrapper
CDW
My hack right now is to create a directory with a SHORT name (that was kind of funny)
FIX
, in which Irequire()
the testing files. This allows me to tests every file, but the bug not allowing Karma to go through directories with long names obviously persists.Environment Details
karma.config.js
file