FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fill `DOMException` names by LiviaMedeiros · Pull Request #43615 · nodejs/node · GitHub

/ node Public

test: fill DOMException names - #43615

Merged
LiviaMedeiros merged 1 commit into
nodejs:mainfrom
LiviaMedeiros:test-fill-domexception-names
Jul 2, 2022
Merged

test: fill DOMException names#43615
LiviaMedeiros merged 1 commit into
nodejs:mainfrom
LiviaMedeiros:test-fill-domexception-names

Conversation

Copy link
Copy Markdown
Member

DOMException.name is preferable over DOMException.code. Also this makes affected tests a bit more self-documented.

Note that instead of numbers we can use legacy constants exposed as DOMException properties.
And for testing compatibility with Web APIs we can explicitly check that error is not Node.js-specific by asserting its constructor.

  throws(
    () => AbortSignal.abort().throwIfAborted(),
    {
      constructor: DOMException,
      code: DOMException.ABORT_ERR,
      name: 'AbortError',
    }
  );

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 29, 2022
LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2022

This comment was marked as outdated.

aduh95 added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jun 29, 2022

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

PR-URL: nodejs#43615
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
LiviaMedeiros force-pushed the test-fill-domexception-names branch from f02e01e to 2014608 Compare July 2, 2022 14:02

Copy link
Copy Markdown
Member Author

Landed in 2014608

LiviaMedeiros merged commit 2014608 into nodejs:main Jul 2, 2022
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #43615
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL