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

t.throws exception when it doesnt throw #1176

Closed
ccorcos opened this issue Jan 10, 2017 · 3 comments
Closed

t.throws exception when it doesnt throw #1176

ccorcos opened this issue Jan 10, 2017 · 3 comments

Comments

@ccorcos
Copy link

ccorcos commented Jan 10, 2017

with the following file:

import test from 'ava'

test('foo', t => {
  t.throws(() => {})
})

I get an error:

❯❯❯ ava src/pcombs3.test.js

  2 exceptions

  Uncaught Exception
  TypeError: Cannot read property 'type' of undefined
    node_modules/clean-yaml-object/index.js:69:9
    cleanYamlObj (node_modules/clean-yaml-object/index.js:57:15)
    module.exports (node_modules/clean-yaml-object/index.js:3:9)

  ✖ Test results were not received from src/pcombs3.test.js

Versions:

Node.js v7.0.0
darwin 16.0.0
0.17.0
4.0.1
@sindresorhus
Copy link
Member

Hm, weird. This is what I'm getting with your exact code and environment:

1 failed

  foo
  Missing expected exception..
    Test.t [as fn] (test.js:4:4)

@ccorcos
Copy link
Author

ccorcos commented Jan 11, 2017

hmm I just realized I was pull the magic assert branch locally so maybe that was being use rather than the global ava. things seem to work now...

@ccorcos ccorcos closed this as completed Jan 11, 2017
@sindresorhus
Copy link
Member

Yes, I've confirmed it's an issue with the magic-assert PR.

@sindresorhus sindresorhus mentioned this issue Jan 11, 2017
24 tasks
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

No branches or pull requests

2 participants