Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add basic test

  • Loading branch information...
commit 210685b0b15da4e5975181803cffaa8b7b869b0d 1 parent 18eeb1b
@ben-lin ben-lin authored
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
3  package.json
@@ -7,6 +7,9 @@
"dependencies": {
"node.extend" : ""
},
+ "devDependencies": {
+ "should" : "0.5.1"
+ },
"repository": {
"type": "git",
"url" : "https://github.com/dreamerslab/node.flow.git"
View
10 test/flow.js
@@ -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
15 test/run.js
@@ -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 :)' );
+});
Please sign in to comment.
Something went wrong with that request. Please try again.