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

When t.end() is not called, print the name. #498

Merged
merged 1 commit into from
Mar 2, 2020
Merged

When t.end() is not called, print the name. #498

merged 1 commit into from
Mar 2, 2020

Conversation

Raynos
Copy link
Collaborator

@Raynos Raynos commented Mar 2, 2020

If you forget to call t.end() on some test somewhere
and all the other tests pass then you will get a warning
about not having called t.end().

This warning misses which tests should have ended.

A stack trace should be actionable.
@Raynos Raynos requested a review from ljharb March 2, 2020 13:38
Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is super helpful

.gitignore Outdated Show resolved Hide resolved
@ljharb ljharb merged commit 0cee8c5 into master Mar 2, 2020
@ljharb ljharb deleted the forgot-end branch March 2, 2020 20:08
@ljharb
Copy link
Collaborator

ljharb commented Mar 2, 2020

I'll have a v4.x and a v5 prerelease out soon that contains this PR.

ljharb pushed a commit that referenced this pull request Mar 2, 2020
A stack trace should be actionable.
ljharb added a commit that referenced this pull request Mar 2, 2020
 - [patch] Print name of test that didnt end (#498)
 - [Refactor] remove unused code
 - [Deps] update `resolve`
 - [eslint] enable `quotes` rule
 - [Tests] add tests for edge cases and numerics
ljharb added a commit that referenced this pull request Mar 3, 2020
Changes since v5.0.0-next.4:
 - [Breaking] only `looseEqual`/`deepEqual, and their inverses, are now non-strict.
 - [Breaking] make equality functions consistent:
 - [Breaking] `equal`: use `==`, not `===`, to match `assert.equal`
 - [Breaking] `strictEqual`: bring `-0`/`0`, and `NaN` into line with `assert`
 - [patch] Print name of test that didnt end (#498)
 - [Refactor] remove unused code
 - [Deps] update `resolve`

Changes since v4.13.2:

 - [Breaking] only `looseEqual`/`deepEqual, and their inverses, are now non-strict.
 - [Breaking] make equality functions consistent:
 - [Breaking] `equal`: use `==`, not `===`, to match `assert.equal`
 - [Breaking] `strictEqual`: bring `-0`/`0`, and `NaN` into line with `assert`
 - [Breaking] update `deep-equal` to v2
 - [Breaking] fail any assertion after `.end()` is called (#489)
 - [Breaking] `error` should not emit `expected`/`actual` diags (#455)
 - [Breaking] support passing in an async function for the test callback (#472)
 - [Breaking] tests with no callback are failed TODO tests (#69)
 - [Breaking] equality functions: throw when < 2 arguments are provided
 - [Breaking] add "exports" to restrict public API
 - [Breaking] `throws`: bring into line with node’s `assert.throws`
 - [Breaking] use default `require.extensions` collection instead of the magic Array `['.js']` (#396)
 - [meta] change dep semver prefix from ~ to ^
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