Closed MartinFerret closed 8 months ago
Usually this is an issue with the bootstrapping code. Your bootstrapping code should look like this. One of the hidden features of SafeTest is you can add #safetest
to the url, reload the page, and the console should display all the test files and associated tests. See here for that working in the example angular app.
Does that show you all your test files and tests? If not then you probably have something misconfigured in the bootstrapping code.
I do have the same config file, I'm comparing what changes between my config and yours, because in the example file it works fine.
When tests with "render" are running, that very error is displayed in console :
jest file :
setup safetest file :
main.ts :
Do you have any idea where doest it come from ?
The only difference entre yours and mine, is that mine added npm install safetest.
That error is a red herring, it's fixed in https://github.com/kolodny/safetest/commit/f57bb0f479b9d299288ec28b372027eb4b9752b5#diff-81a6613f09b12b04742d8b6ef9524cac4577d91a2440485d0cacace86f489069R60, it just needs to be released.
Everything should work per your config. Can you create a minimal repo that has the issue?
Yes of course,I'll post my github link here by tomorrow so you can have a look at it
Here it is @kolodny , gave you the rights to access it.
https://github.com/MartinFerret/safetest-error-case
npm install npx jest
When the browser opens, check in the console and the error appears, also the navigator, obviously, is blocking trying to figure out a way to execute the tests, but gets stuck.
OK, I see the issue was that windows was using \
while webpack is expecting /
. I published a fix in version 0.1.13
. Can you let me know if that fixes the issue?
Thanks a lot, it resolves the issue on windows !
When I run my tests, I'm able to do it when it's simple, like that :
When it involves rendering something, I can't get it working, the page tries to load but doesn't, like that :
I'm integrating it on a project, in Angular 16.
Is there a specific config to handle this or that causes the crash ?