Skip to content

test: skip mustCall checks if there's already an error#281

Merged
aduh95 merged 1 commit intonodejs:mainfrom
aduh95:test-mustCall
Oct 11, 2021
Merged

test: skip mustCall checks if there's already an error#281
aduh95 merged 1 commit intonodejs:mainfrom
aduh95:test-mustCall

Conversation

@aduh95
Copy link
Copy Markdown
Contributor

@aduh95 aduh95 commented Oct 11, 2021

This avoids double reporting of the same error.

[Error: ENOENT: no such file or directory, open '…/test/fixtures/fail-nodejs-yaml-comments.md'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '…/test/fixtures/fail-nodejs-yaml-comments.md'
}
file://…/test/test.js:28
      throw error;
      ^

Error: The Promise never fulfilled
    at mustCall (file:///test/test.js:19:33)
    at file://…/test/test.js:69:11

The The Promise never fulfilled is not useful, as the error is already reported just above.

This avoids double reporting of hte same error.
Comment thread test/test.js
@aduh95 aduh95 merged commit f0a5cd0 into nodejs:main Oct 11, 2021
@aduh95 aduh95 deleted the test-mustCall branch October 11, 2021 20:19
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 this pull request may close these issues.

2 participants