-
Notifications
You must be signed in to change notification settings - Fork 5
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
tests are silently failing in CI #7662
Comments
My first suspicion is that it is to do with this (and a similar thing in catalogue): So the tests could all fail, but it will still return a zero exit code as long as that test runs. It may also mean that some tests are not being run (if |
Yes. I have commented out most of that file in catalogue and forced a failure. |
It would appear that the mocking of process.exit is not being applied in the expected scope. If I call process.exit in the test file, it uses the mock, but when it calls server.close, which calls process.exit it calls the real process.exit. |
It has been failing and erroneously passing this way since November, build 4704 - https://buildkite.com/wellcomecollection/experience/builds/4704#831bee00-4923-47f0-885f-890239bd8bce with this change. |
That turns out to be when this mocking was introduced. |
It also appears that catalogue (at least) is missing some libraries required for testing. This is probably missed by developers working in their own environments because they are sharing an environment between all the workspaces, but when the Docker images are all built, they are built from the individual package.json files. |
Quoting Paul in Slack:
The text was updated successfully, but these errors were encountered: