Skip to content

test: move assert to improve clarity - #6428

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:range
Closed

test: move assert to improve clarity#6428
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:range

Conversation

@Trott

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

test assert

Description of change

A test is run, and then the relevant assertion is put after a different
test. Place the assertion near the relevant thing it is testing for
clarity.

A test is run, and then the relevant assertion is put after a different
test. Place the assertion near the relevant thing it is testing for
clarity.
@TrottTrott added assert Issues and PRs related to the assert subsystem. test Issues and PRs related to the tests. labels Apr 27, 2016
@cjihrig

Copy link
Copy Markdown
Contributor

LGTM

@mscdex

Copy link
Copy Markdown
Contributor

A tad unrelated but wouldn't it be better to just use assert.throws(...) there instead?

@Trott

Copy link
Copy Markdown
MemberAuthor

@mscdex Yup, probably. I started in on that too but then my "no no no, keep the changeset minimal, do that other stuff some other time" impulse took over.

@Trott

Copy link
Copy Markdown
MemberAuthor

@mscdex And...it looks like I'll be doing exactly that anyway in the fix for #6416 so this might just get closed anyway...

@jasnell

Copy link
Copy Markdown
Member

LGTM if you decide to land this.

@jasnell

Copy link
Copy Markdown
Member

@addaleaxaddaleax added the wip Issues and PRs that are still a work in progress. label Apr 29, 2016
@addaleax

Copy link
Copy Markdown
Member

Adding in progress here because there doesn’t seem any point in landing this if #6432 does.

@jasnell

Copy link
Copy Markdown
Member

Agreed.

@Trott

Copy link
Copy Markdown
MemberAuthor

#6432 landed so I'm going to close this.

@TrottTrott closed this Apr 29, 2016
@Trott
Trott deleted the range branch January 13, 2022 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.testIssues and PRs related to the tests.wipIssues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Trott@cjihrig@mscdex@jasnell@addaleax