2014-05-16 16:37:34 +00:00
|
|
|
var requirejs = require('requirejs');
|
|
|
|
|
|
|
|
requirejs.config({
|
|
|
|
paths: {
|
|
|
|
"tests": "../tests",
|
|
|
|
"src": "../src",
|
|
|
|
"spec": "../tests/spec",
|
|
|
|
"bugs": "../tests/bugs",
|
|
|
|
"util": "../tests/lib/test-utils",
|
|
|
|
"Filer": "../dist/filer"
|
|
|
|
},
|
|
|
|
baseUrl: "./lib",
|
|
|
|
optimize: "none",
|
|
|
|
shim: {
|
|
|
|
// TextEncoder and TextDecoder shims. encoding-indexes must get loaded first,
|
|
|
|
// and we use a fake one for reduced size, since we only care about utf8.
|
|
|
|
"encoding": {
|
|
|
|
deps: ["encoding-indexes-shim"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
nodeRequire: require
|
|
|
|
});
|
|
|
|
|
2014-05-16 17:18:13 +00:00
|
|
|
GLOBAL.document = {};
|
|
|
|
GLOBAL.navigator = { userAgent: ""};
|
|
|
|
GLOBAL.window = {
|
|
|
|
addEventListener: function(){},
|
|
|
|
navigator: navigator,
|
|
|
|
document: document,
|
|
|
|
setTimeout: setTimeout
|
|
|
|
};
|
2014-05-16 16:37:34 +00:00
|
|
|
GLOBAL.expect = require('chai').expect;
|
|
|
|
|
2014-05-16 17:18:13 +00:00
|
|
|
describe("Mocha needs one test in order to wait on requirejs tests", function() {
|
|
|
|
it('should wait for other tests', function(){
|
|
|
|
require('assert').ok(true);
|
2014-05-16 16:37:34 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2014-05-16 17:18:13 +00:00
|
|
|
requirejs(["tests/test-manifest"]);
|