The config
argument you need to pass is the module ID of your intern.js (aka config file).
Dojo baseUrl error running Intern.io functional tests locally
Question
I'm trying to get Intern.io to perform functional tests against a local Selenium standalone server (as asked here: How do I setup Selenium 2 Server so intern can run functional tests locally, on one browser?) and an answer with some instructions was provided here: https://gist.github.com/neonstalwart/6630466
However, I keep getting the following error:
/home/dave/ScratchPad/InternTutorial/intern-tutorial/node_modules/intern/node_modules/dojo/dojo.js:74
baseUrl = (config.baseUrl || baseUrl).replace(/\/*$/, '/');
^
TypeError: Cannot read property 'baseUrl' of undefined
This was actually the same error I was getting before I followed the instructions. I'm guessing that I have my "loader" attribute configured incorrectly in my "intern.js" file. It's currently set to the following:
loader: {
// Packages that should be registered with the loader in each testing environment
//packages: [ { name: 'myPackage', location: '.' } ]
packages: [ { name: 'app', location: 'app' } ],
map: { 'app': { dojo: './node_modules/intern/node_modules/dojo' } }
},
I'm following the Intern tutorial here: https://github.com/theintern/intern-tutorial and just want to be able to run the functional tests locally and not against SauceLabs.
Has anyone had any experience of this error and have a solution?
Thanks
La solution 2
Autres conseils
I believe the command you are looking to execute is
node ./node_modules/.bin/intern-runner config=tests/intern.js
This is if you followed instructions from the tutorial here: https://github.com/theintern/intern-tutorial/blob/a6b3daf872d11c6ec7edcf4b493de68b47dfe0b6/README.md