Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

test/cli.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,27 @@ test("cli", function(t) {
111111
})
112112
planned+=2
113113

114-
var watchProcess = exec(cssnextBin + " --watch test/fixtures/cli.error.css test/fixtures/cli.output--watch.css", function(err) {
115-
t.ok(err && err.signal === "SIGTERM", "should only be killed by an interrupt when `--watch` option passed")
116-
if (err && !err.killed) { throw err }
117-
})
118-
var msgWatch = "should output error messages when `--watch` option passed"
119-
var watchTimeout = setTimeout(function() {
120-
t.fail(msgWatch)
121-
watchProcess.kill("SIGTERM")
122-
}, 5000)
123-
watchProcess.stderr.on("data", function(data) {
124-
if (utils.contains(data, "encounters an error")) {
125-
t.pass(msgWatch)
126-
clearTimeout(watchTimeout)
127-
watchProcess.kill("SIGTERM")
128-
}
129-
})
130-
planned+=2
114+
// I don't success to call the kill() process from node and both Travis CI and Appveyor
115+
// so we avoid this test on this environnements
116+
if (!process.env.TRAVIS && !process.env.APPVEYOR) {
117+
var watchProcess = exec(cssnextBin + " --watch test/fixtures/cli.error.css test/fixtures/cli.output--watch.css", function(err) {
118+
t.ok(err && err.signal === "SIGTERM", "should only be killed by an interrupt when `--watch` option passed")
119+
if (err && !err.killed) { throw err }
120+
})
121+
var msgWatch = "should output error messages when `--watch` option passed"
122+
var watchTimeout = setTimeout(function() {
123+
t.fail(msgWatch)
124+
watchProcess.kill()
125+
}, 5000)
126+
watchProcess.stderr.on("data", function(data) {
127+
if (utils.contains(data, "encounters an error")) {
128+
t.pass(msgWatch)
129+
clearTimeout(watchTimeout)
130+
watchProcess.kill()
131+
}
132+
})
133+
planned+=2
134+
}
131135

132136
t.plan(planned)
133137
})

0 commit comments

Comments
 (0)