BackboneJS-AMD-Boilerplate
BackboneJS-AMD-Boilerplate copied to clipboard
How to add more specs?
Hello David,
I tried to add more specs to the spec-runner.js file in the Array at this position:
//list of specs to run
My spec runner looks like this:
(function() { "use strict"; var specsPath = '../../tests/js/specs/'; define([ specsPath + 'main-view-spec', specsPath + 'binary.switch.device.view.spec' ], function(specStub) { return { ...
I can see in the console that the new file "binary.switch.device.view.spec" is actually loaded, but none of the tests is being executed. If I put the new spec file to the first position of the array, the contained specs are successfully executed. So how is it possible to test more than one single spec file?
Thanks Marc
Hi Marc,
Thanks for taking a look. Right now, to run the test, you have to return an object w/ a test method that runs the tests then run the test method in spec-runner.js. You can see this being run in spec-runner.js where "specStub.test()" is being run (that name was a late-night mistake. I just updated the name to "mainViewSpec.test()").
It's more than kinda hacky right now, I know. I did a bit of a brain dump lat at night just to get a draft down. In the next week or so, I'm going to see about simplifying that process. I my next step will be for you to just write the test method and have it automatically run.
Let me know if you have any other questions and/or input.
Thanks!
David