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

npm run test:ci prints failures but exits success #457

Closed
bickelj opened this issue Aug 24, 2023 · 2 comments · Fixed by #462
Closed

npm run test:ci prints failures but exits success #457

bickelj opened this issue Aug 24, 2023 · 2 comments · Fixed by #462
Assignees

Comments

@bickelj
Copy link
Contributor

bickelj commented Aug 24, 2023

See https://github.com/PhilanthropyDataCommons/service/actions/runs/5966921283/job/16187534824#step:7:20 and the corresponding "success".

Locally when running npm run test:ci I get failures printed but exit 0:

$ npm run test:ci

> @pdc/service@0.3.0 test:ci
> jest --config=jest.config.ci.js --runInBand

Determining test suites to run...ts-jest[versions] (WARN) Version 5.1.6 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
 FAIL  src/__tests__/proposalVersions.int.test.ts
  ● Test suite failed to run
...
$ echo $?
0
@slifty
Copy link
Member

slifty commented Aug 24, 2023

Unfortunately this is a bug within ts-jest: see kulshekhar/ts-jest#4193

@slifty
Copy link
Member

slifty commented Aug 25, 2023

@jasonaowen pointed out that in the short term we can simply run our tests twice -- once with coverage and once without (coverage is what causes the masked error code). I'm gonna assign myself to making that change.

@slifty slifty self-assigned this Aug 25, 2023
slifty added a commit that referenced this issue Aug 25, 2023
There is currently a bug in the `ts-jest` project [1] which causes
compile failures to result in a masked failing exit code *if test
coverage is being generated*.

The best solution would be to patch upstream, but in lieu of that we are
going to just run tests twice: once without coverage and once with
coverage.

Issue #457 npm run test:ci prints failures but exits success

[1] kulshekhar/ts-jest#4193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants