Skip to content

Commit

Permalink
WIP on node-qunit testing, not working yet
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 3, 2011
1 parent 7494ea7 commit 5bd1ad6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var qunit = require('qunit'),
path = require('path');

qunit.options.coverage = false;

function abspath(p) {
return path.join(__dirname, p);
}

// time.js tests aren't dependent on js-forms in any way
qunit.run({
code: abspath('../src/time.js'),
tests: abspath('time.js')
});

// js-forms tests
var lib = abspath('../js-forms.js')
path.exists(lib, function(exists) {
if (!exists) {
console.log(lib + " doesn't exist - run build.py");
return;
}

qunit.run({
code: lib,
tests: ['util.js', 'validators.js', 'forms.js', 'formsets.js',
'fields.js','errormessages.js', 'widgets.js', 'extra.js',
'regressions.js'].map(abspath)
});
});

0 comments on commit 5bd1ad6

Please sign in to comment.