Skip to content

Commit 1e62626

Browse files
committed
Merge pull request #591 from sindresorhus/fix-010-watch-test
Fix watcher test with Node 0.10
2 parents 4a1bd79 + 7d0c6f3 commit 1e62626

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

.travis.yml

-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ before_install:
88
- 'npm install -g npm@latest'
99
after_success:
1010
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'
11-
matrix:
12-
allow_failures:
13-
- node_js: '0.10'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"cli-table2": "^0.1.9",
135135
"coveralls": "^2.11.4",
136136
"delay": "^1.3.0",
137-
"get-stream": "^1.1.0",
137+
"get-stream": "^2.0.0",
138138
"git-branch": "^0.3.0",
139139
"inquirer": "^0.11.1",
140140
"lolex": "^1.4.0",

test/cli.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,9 @@ test('watcher works', function (t) {
141141

142142
var buffer = '';
143143
var passedFirst = false;
144-
// Pause the stream before attaching the 'data' listener. execCli() uses
145-
// get-stream which read()s from the stream. The test just needs to piggyback
146-
// on that without switching the stream to flowing mode.
147-
child.stderr.pause().on('data', function (str) {
144+
child.stderr.on('data', function (str) {
148145
buffer += str;
149-
if (/1 test passed/.test(str)) {
146+
if (/1 test passed/.test(buffer)) {
150147
if (!passedFirst) {
151148
touch.sync(path.join(__dirname, 'fixture/watcher/test.js'));
152149
buffer = '';

0 commit comments

Comments
 (0)