stalniy / bdd-lazy-var

Provides UI for testing frameworks such as mocha, jasmine and jest which allows to define lazy variables and subjects.
MIT License
162 stars 14 forks source link

Add compatibility with mocha 6 #63

Closed eugenk closed 5 years ago

eugenk commented 5 years ago

This package does not seem to work with mocha 6. Up to mocha 5.2.0, everything is just fine. Mocha 6.0.2, however, produces the following error:

$ node_modules/mocha/bin/_mocha --ui bdd-lazy-var/global

  1) Uncaught error outside test suite

  0 passing (1ms)
  1 failing

  1) Uncaught error outside test suite:
     Uncaught TypeError: suite.hasOnly is not a function
      at Array.some (<anonymous>)
      at startup (bootstrap_node.js:204:16)
      at bootstrap_node.js:625:3

Running

node_modules/mocha/bin/_mocha --ui bdd

successfully runs the tests, though.

eugenk commented 5 years ago

Oh, I see that there is already a commit on master that does this. There's just no npmjs release.

eugenk commented 5 years ago

Nevermind the previous comment. The master version is not compatible to mocha 6. It still fails with the same error

stalniy commented 5 years ago

I'll try to look at this on weekend, thanks!

stalniy commented 5 years ago

Hmm... as far as I see from Travis build history tests for mocha were successfully passed.

I’ll double check it on my local pc. Also I’d recommend to use npm scripts or node_modules/.bin/mocha to run tests.

stalniy commented 5 years ago

All tests are passed in the repository with mocha v6.0.2 . I can reproduce the error, maybe you can create a small repo with the error?

Meanwhile I published a patch version with upgraded version for mocha

eugenk commented 5 years ago

The weirdest thing happened: I cannot reproduce this error any more. I installed bdd-lazy-var 2.5.1 and then everything worked like a charm. Even after downgrading to 2.5.0 (which did not work when I opened this issue), it worked perfectly. Sorry for the inconvenience.

stalniy commented 5 years ago

No problem, thanks for the feedback. I’m closing this but fill free to ping me if there are some steps to reproduce