Skip to content

Commit

Permalink
browser tests activated
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBild committed May 30, 2013
1 parent a64c7d9 commit 1fa5adc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
2 changes: 1 addition & 1 deletion lib/cflow.js
Expand Up @@ -9,5 +9,5 @@ var Flow = function(){
this.args[0].apply(next);
}

if (typeof window === "undefined")
if (typeof window === "undefined" && module && module.exports)
module.exports = Flow;
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -13,7 +13,7 @@
"node": ">0.8.0"
},
"scripts": {
"test": "mocha test/spec.js && mocha-phantomjs test/browser/index.html"
"test": "mocha && mocha-phantomjs test/browser/index.html"
},
"main": "./lib/cflow",
"author": "Mike Bild",
Expand All @@ -23,7 +23,7 @@
},
"testling": {
"browsers": ["chrome/canary"],
"files": "test/browser/spec.js"
"files": "test/*.js"
},
"keywords": [
"async",
Expand Down
35 changes: 0 additions & 35 deletions test/browser/spec.js

This file was deleted.

7 changes: 5 additions & 2 deletions test/spec.js
@@ -1,8 +1,11 @@
if (typeof window === "undefined")
if (typeof window === "undefined") {
var expect = require("chai").expect,
Flow = require("../lib/cflow");
else
} else if(typeof chai === "undefined") {
var expect = require("chai").expect;
} else {
var expect = chai.expect;
};

describe("cflow", function () {
it("sequential", function (done) {
Expand Down

0 comments on commit 1fa5adc

Please sign in to comment.