I know there are a couple of similar questions already answered (Testing custom JavaScript (not Node module) with Intern and Can't get Intern to run Node.js Module), but even after reading those answers, I've still been unable to get some simple tests to run using Intern. I feel like there is just one small piece that I am overlooking or missing.
I am trying to evaluate Intern for use with an existing Javascript project. It's not a Node project, just plain Javascript. If it matters, I am trying to perform this evaluation on a Windows machine.
My project hierarchy looks like this:
APEFIntern/ apeform/ test/ intern.js - Intern configuration spec_inwf.js - Tests for inwf inwf.js - Code to test intern/
Intern configuration file:
// ... // Configuration options for the module loader; any AMD configuration options supported by the Dojo loader can be // used here loader: { // Packages that should be registered with the loader in each testing environment //packages: [ 'apeform' ] }, // Non-functional test suite(s) to run in each browser suites: [ 'apeform/test/spec_inwf' ], // ...
I'm pretty new to Node and AMD, but I believe that since my project is not a node project, I do not need to use the loader.packages configuration?
Test file spec_inwf.js
define([ 'intern!bdd', 'intern!chai!expect', 'apeform/inwf.js' ], function (bdd, expect) { with (bdd) { describe("inwf suite", function () { // Tests }); } });
I execute the following command to try and run the tests:
node client.js config=apeform/test/intern
The only output I receive from the command is:
Defaulting to "console" reporter
If I set the suites array to be empty in the Intern configuration, I get the message "0/0 tests passed" when I execute the command in #4. I believe this is the correct output. But whenever I try to connect to a test suite, the tests aren't run. I'm not sure what else I'm missing from this equation. Any help would be appreciated.