From 5bd1ad6f6bb5e1f3f50b983d0474ad5441050f9e Mon Sep 17 00:00:00 2001 From: Jonathan Buchanan Date: Thu, 3 Mar 2011 15:35:09 +0000 Subject: [PATCH] WIP on node-qunit testing, not working yet --- tests/tests.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/tests.js diff --git a/tests/tests.js b/tests/tests.js new file mode 100644 index 0000000..fd61a19 --- /dev/null +++ b/tests/tests.js @@ -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) + }); +});