2013-11-27 17:18:09 +00:00
|
|
|
/**
|
|
|
|
* Assembles fs.js at runtime in the browswer, as well as all test
|
|
|
|
* spec files. Add spec files to the list in test-manifest.js
|
|
|
|
*/
|
|
|
|
|
|
|
|
require.config({
|
|
|
|
paths: {
|
|
|
|
"tests": "../tests",
|
|
|
|
"src": "../src",
|
|
|
|
"spec": "../tests/spec",
|
2014-01-14 15:56:36 +00:00
|
|
|
"Filer": "../src/index"
|
2013-11-27 17:18:09 +00:00
|
|
|
},
|
|
|
|
baseUrl: "../lib",
|
2013-11-27 18:08:26 +00:00
|
|
|
optimize: "none",
|
|
|
|
shim: {
|
2013-12-02 20:10:43 +00:00
|
|
|
// 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.
|
2013-11-27 18:08:26 +00:00
|
|
|
"encoding": {
|
2013-12-02 20:10:43 +00:00
|
|
|
deps: ["encoding-indexes-shim"]
|
2013-11-27 18:08:26 +00:00
|
|
|
}
|
|
|
|
}
|
2013-11-27 17:18:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
require(["tests/test-manifest"], function() {
|
|
|
|
var jasmineEnv = jasmine.getEnv();
|
|
|
|
jasmineEnv.updateInterval = 1000;
|
|
|
|
|
|
|
|
var htmlReporter = new jasmine.HtmlReporter();
|
|
|
|
|
|
|
|
jasmineEnv.addReporter(htmlReporter);
|
|
|
|
|
|
|
|
jasmineEnv.specFilter = function(spec) {
|
|
|
|
return htmlReporter.specFilter(spec);
|
|
|
|
};
|
|
|
|
|
|
|
|
var currentWindowOnload = window.onload;
|
|
|
|
|
|
|
|
window.onload = function() {
|
|
|
|
if (currentWindowOnload) {
|
|
|
|
currentWindowOnload();
|
|
|
|
}
|
|
|
|
execJasmine();
|
|
|
|
};
|
|
|
|
|
|
|
|
function execJasmine() {
|
|
|
|
jasmineEnv.execute();
|
|
|
|
}
|
|
|
|
});
|