Skip to content

t.throws not that helpful when the message assertion does not match #779

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

Closed
jamestalmage opened this issue Apr 24, 2016 · 2 comments
Closed
Labels
enhancement new functionality

Comments

@jamestalmage
Copy link
Contributor

test(t => {
    t.throws(() => {
        throw new Error('foo');
    }, 'bar');
});

output:

   1 failed

  1. [anonymous]
  foo
      Test.fn (test.js:61:4)

It should show both the expected and actual message. (currently just shows the actual message foo).

@vadimdemedes vadimdemedes added the enhancement new functionality label Apr 24, 2016
@novemberborn
Copy link
Member

We should implement t.throws ourselves, rather than wrapping assert.throws.

@novemberborn
Copy link
Member

Closing in favor of #1047. See also #661.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new functionality
Projects
None yet
Development

No branches or pull requests

3 participants