mercredi 28 février 2018

Can Spectron, mocha, and chai assert that variables have a given state in an Electron-app?

How can we assert that a javascript-variable has some expected value in an electron-app? The current testing framework is spectron, mocha, chai, chai.should(), and chai.use(chaiAsPromised).

I want to assert that the value of the global variable foo has the value 'foo'. When I try foo.should.equal('foo') I get ReferenceError: foo is not defined at Context.<anonymous> (test\spec.js:63:28)

Aucun commentaire:

Enregistrer un commentaire