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

Makes tests crash on unhandled rejections instead of silently ignoring them #808

Merged
merged 10 commits into from
Oct 26, 2020

Conversation

macbre
Copy link
Owner

@macbre macbre commented Oct 26, 2020

DeprecationWarning: Unhandled promise rejections are deprecated

See jestjs/jest#5311 (comment)

✗ Errored » Asynchronous Error
      in Integration tests
      in test/integration-test.js
/home/macbre/github/phantomas/test/integration-test.js:19
	throw err;
	^

Error: Protocol error (Performance.getMetrics): Session closed. Most likely the page has been closed.
    at CDPSession.send (/home/macbre/github/phantomas/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:195:35)
    at Page.metrics (/home/macbre/github/phantomas/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:699:45)
    at /home/macbre/github/phantomas/lib/browser.js:266:37
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

…noring them

See jestjs/jest#5311 (comment)

✗ Errored » Asynchronous Error
      in Integration tests
      in test/integration-test.js
/home/macbre/github/phantomas/test/integration-test.js:19
	throw err;
	^

Error: Protocol error (Performance.getMetrics): Session closed. Most likely the page has been closed.
    at CDPSession.send (/home/macbre/github/phantomas/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:195:35)
    at Page.metrics (/home/macbre/github/phantomas/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:699:45)
    at /home/macbre/github/phantomas/lib/browser.js:266:37
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
@macbre macbre added this to the v2.0 - headless Chromium milestone Oct 26, 2020
@macbre macbre marked this pull request as ready for review October 26, 2020 19:49
@macbre macbre merged commit 55b903e into devel Oct 26, 2020
@macbre macbre deleted the crash-on-unhandled-rejectections branch October 26, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant