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

Cypress support #68

Closed guy333 closed 5 years ago

guy333 commented 5 years ago

Can this be used in cypress, Where there is no access to new Mocha() ?

stalniy commented 5 years ago

I think yes. What you need to find is how to change mocha ui in cypress

stalniy commented 5 years ago

This is the blocker I guess: https://github.com/cypress-io/cypress/issues/1263

stalniy commented 5 years ago

Nothing I can do to help. You need to make a PR to cypress or ask them to implement that feature

atryshkin commented 1 year ago

Hi I tried to connect. You have access to Mocha in bdd-lazy-var/index.js via global.Mocha or global.Cypress.mocha._mocha.Mocha. I have added an interface but the tests are not running

node_modules/bdd-lazy-var/index.js

var _mocha = global.Cypress ? global.Mocha : mocha__default['default']
cypress/support/index.ts

mocha.ui('bdd-lazy-var');