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

dnt exiting normally even though tests fail #86

Closed
sgwilym opened this issue Jan 7, 2022 · 3 comments · Fixed by #89
Closed

dnt exiting normally even though tests fail #86

sgwilym opened this issue Jan 7, 2022 · 3 comments · Fixed by #89
Labels
bug Something isn't working

Comments

@sgwilym
Copy link

sgwilym commented Jan 7, 2022

I'm setting up some Github workflows that include dnt, and am testing against Node v12, v14, and v16.

I expect my build script to fail with v12 and v14 at this point, but v14 is succeeding even though a problem is encountered during tests: https://github.com/earthstar-project/stone-soup/runs/4738270806?check_suite_focus=true#step:5:135

@dsherret dsherret added the bug Something isn't working label Jan 7, 2022
@chronark
Copy link
Contributor

chronark commented Jan 8, 2022

I'm also running into this

the test fails on node14 as expected but dnt still finishes with exitCode 0


(node:11011) UnhandledPromiseRejectionWarning: ReferenceError: EventTarget is not defined
    at Object.<anonymous> (/Users/andreas/github/chronark/upstash-kafka/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js:7:32)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (/Users/andreas/github/chronark/upstash-kafka/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js:5:31)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11011) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11011) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[dnt] Complete!

This seems to be a problem with the generated test_runner.js and not dnt itself, because when I manually run node test_runner.js it also does not fail as expected.

@chronark
Copy link
Contributor

chronark commented Jan 8, 2022

I submitted a fix #89

@cinnamon-bun
Copy link

Related: denoland/node_shims#80 in shim-deno.

It's fixed there, we just need to get an npm release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants