Permalink
Browse files

add basic test

  • Loading branch information...
1 parent 18eeb1b commit 210685b0b15da4e5975181803cffaa8b7b869b0d @ben-lin ben-lin committed Feb 13, 2012
Showing with 28 additions and 0 deletions.
  1. +3 −0 package.json
  2. +10 −0 test/flow.js
  3. +15 −0 test/run.js
View
@@ -7,6 +7,9 @@
"dependencies": {
"node.extend" : ""
},
+ "devDependencies": {
+ "should" : "0.5.1"
+ },
"repository": {
"type": "git",
"url" : "https://github.com/dreamerslab/node.flow.git"
View
@@ -0,0 +1,10 @@
+var flow = require( '../lib/flow' );
+var should = require( 'should' );
+
+module.exports = {
+
+ 'test .version' : function ( callback ){
+ flow.version.should.match( /^\d+\.\d+\.\d+$/ );
+ callback();
+ }
+};
View
@@ -0,0 +1,15 @@
+var tests = require( './flow' );
+var Flow = require( '../lib/flow' );
+var flow = new Flow();
+
+
+
+Object.keys( tests ).forEach( function( test ){
+ flow.parallel( function ( ready ){
+ tests[ test ]( ready );
+ });
+});
+
+flow.join().end( function (){
+ console.log( 'All test passed :)' );
+});

0 comments on commit 210685b

Please sign in to comment.