mercredi 10 août 2016

mocha browser globals, where are they?

This is for browser mocha:

I am wondering how I can access the globals defined in mocha.globals like this:

var myVar = {var: 'var'};

mocha.globals(['myVar']);

How can I access myVar in my test?

It's in neither of these contexts:

  • window.myVar
  • mocha.myVar
  • mocha.options.myVar
  • mocha.options.globals.myVar

How am I supposed to access the mocha globals in browser mocha?

Aucun commentaire:

Enregistrer un commentaire