Browse files

fix a bug in test

  • Loading branch information...
1 parent 119af83 commit 4a021f4b83a78d5503d8006a1c3ad9de0226eb24 @clowwindy clowwindy committed Jul 2, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/test.coffee
  2. +2 −2 test.js
View
4 src/test.coffee
@@ -56,14 +56,14 @@ server.stderr.on 'data', (data) ->
local.stdout.on 'data', (data) ->
console.log data.toString()
- if data.toString().indexOf 'listening at port'
+ if data.toString().indexOf 'listening at port' >= 0
localReady = true
if localReady and serverReady and not curlRunning
runCurl()
server.stdout.on 'data', (data) ->
console.log data.toString()
- if data.toString().indexOf 'listening at port'
+ if data.toString().indexOf 'listening at port' >= 0
serverReady = true
if localReady and serverReady and not curlRunning
runCurl()
View
4 test.js
@@ -71,7 +71,7 @@
local.stdout.on('data', function(data) {
console.log(data.toString());
- if (data.toString().indexOf('listening at port')) {
+ if (data.toString().indexOf('listening at port' >= 0)) {
localReady = true;
if (localReady && serverReady && !curlRunning) {
return runCurl();
@@ -81,7 +81,7 @@
server.stdout.on('data', function(data) {
console.log(data.toString());
- if (data.toString().indexOf('listening at port')) {
+ if (data.toString().indexOf('listening at port' >= 0)) {
serverReady = true;
if (localReady && serverReady && !curlRunning) {
return runCurl();

0 comments on commit 4a021f4

Please sign in to comment.