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

Any chance to make it work with webdriverio? #27

Closed webgago closed 6 years ago

webgago commented 6 years ago

I was trying to make it work but no success... I know they have this https://github.com/webdriverio/wdio-mocha-framework/blob/master/lib/adapter.js#L6 But even when I add bdd-lazy-var to the INTERFACES it doesn't work:

ERROR: Cannot read property 'Symbol(__currentVariableStack)' of undefined
chrome
Type    at Function.fromStack (_PROJECT_/node_modules/bdd-lazy-var/global.js:283:26)
    at Function.evaluate (_PROJECT_/node_modules/bdd-lazy-var/global.js:267:31)
    at get$$1 (_PROJECT_//node_modules/bdd-lazy-var/global.js:356:23)
    at get$$1 (_PROJECT_//node_modules/bdd-lazy-var/global.js:708:22)
stalniy commented 6 years ago

Maybe the issue is that library expects global property to exist on window

Try to define it yourself before running mocha

window.global = window

I will check it on this weekend.

stalniy commented 6 years ago

Recently I published a new version with few bug fixes and performance improvements. Could you please create a reproduction repo, to test things easily?

stalniy commented 6 years ago

close as there is no activity. @webgago feel free to reopen if you think it's still important.

P.S.: I successfully used this with protractor + mocha + chai + chai-as-promised