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

In watch mode, snap-shot-it cannot recover from a syntax error #145

Open
kuceb opened this issue Aug 15, 2018 · 0 comments
Open

In watch mode, snap-shot-it cannot recover from a syntax error #145

kuceb opened this issue Aug 15, 2018 · 0 comments

Comments

@kuceb
Copy link
Collaborator

kuceb commented Aug 15, 2018

Bug

In watch mode, snap-shot-it cannot seem to recover from a syntax error in a test file

Minimal reproduce:

// example.spec.js
it('errors' () => {
  ] // syntax error
})
// example2.spec.js
const snapshot = require('snap-shot-it')
it('should work', ()=>{
  snapshot('foobar')
})
$ npx mocha *.spec.js --watch

image

current behavior:
After correcting the error, snap-shot-it will continue to fail with the same error above:

Error: Missing current test, cannot make snapshot
      at snapshot (node_modules/snap-shot-it/src/index.js:87:11)
      at Context.it (example2.spec.js:5:2)

expected:
After correcting the error, all tests will pass

  • version: 6.0.1
  • platform: Linux
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

1 participant