I'm getting the error Attempt to require unloaded module xxxxxx
with the following intern.js test (myfile.js below does a require('xxxxxx')
) for testing NodeJS.
define(function(require) {
var bdd = require('intern!bdd');
var myfile = require('../myfile.js');
bdd.describe('the thing being tested', function() {
bdd.it('do the test', function() {
...
The directory structure is
intern.js
myfile.js
test
|-- test.js
How do I properly require a file? There's no examples on how to do it with the BDD test interface. There are examples of doing it with the other style like in How do I load the node.js http module from within an intern.js test? but that doesn't use BDD.
Does it have anything to do with properties I need to set in intern.js file?