Skip to content
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 fail when ran on CI/CD server, but work locally #180

Open
paul-uz opened this issue Oct 21, 2022 · 1 comment
Open

Tests fail when ran on CI/CD server, but work locally #180

paul-uz opened this issue Oct 21, 2022 · 1 comment

Comments

@paul-uz
Copy link

paul-uz commented Oct 21, 2022

I have written a test that uses beforeAll to insert 3 records to jest-dynamodb. I wrote 3 simple tests that expect a certain number of results for each test. These work great locally, with everything passing.

However, when I run the exact same tests and cde on our Jenkins CI/CD server, the test fail with the expectant number of results being wrong.

What is even stranger is that after several attempts, the tests ran successfully, only for them to fail again afterwards, with no modification to the code.

I'm using ts-jest as well, and I make sure to run the tests (*.test.ts files) before compiling the index.ts files.

@slmarcos
Copy link

slmarcos commented Dec 27, 2022

I'm with the same problems using code build. I'm just inserting the records in my second test but my fist test fail with the data that are inserted on the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants