-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: No tests detected on Windows #270
Comments
It looks to be an issue with Jest not liking symlinks, or particularly leaf symlinks. Others have raised issues with I thought it might have been a As discussed in the Jest issue linked above, it is down to the file crawler in I found that applying the following patch (using the
|
It looks from your build hooks as though you have builds running and passing tests on Windows, but I don't understand how they could unless a port of |
Incidentally
??= rather than = so that other haste options are not overwritten/ignored..?
|
What happened?
I've been trying to get some simple unit tests working with
rules_jest
: it's been fine on Linux and OSX, but the rules fail on Windows: I just getand variations on that theme. After struggling with my own examples, I tried to just run the example at https://github.com/aspect-build/bazel-examples/tree/main/jest
This showed the same problem.
Version
Development (host) and target OS/architectures:
Windows 10 Pro
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
Just run `bazel run //src:src_test` on windows against https://github.com/aspect-build/bazel-examples/tree/main/jest
Any other information?
I had to struggle to get it the example project to build (I needed to disable hooks for two npm dependencies), and also had some issues because the split code/test
ts_project
targets run into the known issue with the sources from one being picked up by the other (I got a lot of file permissions errors when the test compile target tried to produce the same outputs as the source compile target; however even when I changed it to have a single compilationts_project
the test target failed to run).I've tried setting
patch_node_fs = False
(had some problems with test rules on windows before and this seemed to fix it) but didn't seem to help.The run files tree looks fine - the source and test js files are all output OK as they are on other platforms. I've even added some code to my
jest.config.js
to write some output to a file with the result of callingglob.sync('**/*.js')
and that picks the files up OK, so they are visible to node...The text was updated successfully, but these errors were encountered: