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

Variables collisions inside describe.skip #6

Closed Todmy closed 8 years ago

Todmy commented 8 years ago

Here stacktrace:

[launcher] Error: Error: Cannot define "subject" variable twice in the same suite.
        at Object.lazyVar.register (C:\SpectrumMgmt\EsmSpectrum\ui\node_modules\bdd-lazy-var\lib\lazy_var.js:10:13)
        at context.def (C:\SpectrumMgmt\EsmSpectrum\ui\node_modules\bdd-lazy-var\lib\interface.js:58:20)
        at context.subject (C:\SpectrumMgmt\EsmSpectrum\ui\node_modules\bdd-lazy-var\lib\interface.js:31:45)
        at Suite.<anonymous> (C:\SpectrumMgmt\EsmSpectrum\ui\test\e2e\pages\configure\channels\wizard\section\proxy\proxy-e2etest.js:10(cat))
        at context.xdescribe.context.xcontext.context.describe.skip (C:\SpectrumMgmt\EsmSpectrum\ui\node_modules\mocha\lib\interfaces\bdd.js:64:10)
        at [object Object].Object.extend.describe (C:\SpectrumMgmt\EsmSpectrum\ui\test\e2e\lib\feature.js:29:5)
        at Object.<anonymous> (C:\SpectrumMgmt\EsmSpectrum\ui\test\e2e\pages\configure\channels\wizard\section\proxy\proxy-e2etest.js:5:25)
        at Module._compile (module.js:435:26)
        at Object.Module._extensions..js (module.js:442:10)
        at Module.load (module.js:356:32)
[launcher] Process exited with error code 100

I got this error when I skip several "describes". It looks like lazy-var tries to define the variable for the wrong test suit.

Keep in mind that it is produced only for describe.skip.

stalniy commented 8 years ago

Thanks for the report. Fixed