fabric.js/test.js
Drew Lustro 1f993e92b8 requirejs support added via "requirejs" build.sh option
$ node build modules=ALL requirejs
- dist/all* is clean of changes
- fixed bug in build.sh that would prevent dist/all.require.js from compiling properly
- Updated test.js to include test_script.js fixtures
- NOTE: Qunit tests largely incompatible with requirejs version... need more
insight on how Qunit works to get fabric in the namespace since it is
no longer a global when built as an AMD module.
2013-09-03 14:15:12 -04:00

44 lines
1.1 KiB
JavaScript

var testrunner = require('qunit');
testrunner.options.log.summary = true;
testrunner.options.log.tests = false;
testrunner.options.log.assertions = false;
testrunner.run({
deps: "./test/fixtures/test_script.js",
code: "./dist/all.js",
tests: [
'./test/unit/rect.js',
'./test/unit/ellipse.js',
'./test/unit/color.js',
'./test/unit/circle.js',
'./test/unit/line.js',
'./test/unit/polyline.js',
'./test/unit/polygon.js',
'./test/unit/path.js',
'./test/unit/path_group.js',
'./test/unit/observable.js',
'./test/unit/object.js',
'./test/unit/text.js',
'./test/unit/util.js',
'./test/unit/image.js',
'./test/unit/image_filters.js',
'./test/unit/group.js',
'./test/unit/parser.js',
'./test/unit/canvas.js',
'./test/unit/canvas_static.js',
'./test/unit/gradient.js',
'./test/unit/pattern.js',
'./test/unit/shadow.js'
]
}, function(err, report) {
if (err) {
console.log(err);
process.exit(1);
}
if(report.failed > 0){
process.on('exit', function() {
process.exit(1);
});
}
});