diff options
author | Joseph Frazier <joseph@onsip.com> | 2015-10-05 03:09:15 +0300 |
---|---|---|
committer | Joseph Frazier <joseph@onsip.com> | 2015-10-07 05:45:11 +0300 |
commit | 80d615b417e4c869b3cde4fec084f25e908aad1f (patch) | |
tree | 51fa3a2c1f2f4d5084aa3f6b9ff5f5c78d351b37 /bin | |
parent | 3fc0668c639cf5f1780de9a338fd320431013a3c (diff) |
tests use cross-spawn-async instead of child_process.spawn
This allows Windows to run the tests, as promised in
https://github.com/feross/webtorrent/issues/429#issuecomment-146061289
Note that there are a couple of outstanding failures on Windows:
# client.seed: filesystem path to folder with one file, string
not ok 8 should be equal
---
operator: equal
expected: '3a686c32404af0a66913dd5f8d2b40673f8d4490'
actual: 'e6887b78d89d995876c7cef3476b6fb32c4c4e3d'
...
not ok 9 should be equal
---
operator: equal
expected: |-
'magnet:?xt=urn:btih:3a686c32404af0a66913dd5f8d2b40673f8d4490&dn=folder&tr=udp%3A%2F%2Ftracker.webtorrent.io%3A80'
actual: |-
'magnet:?xt=urn:btih:e6887b78d89d995876c7cef3476b6fb32c4c4e3d&dn=folder&tr=udp%3A%2F%2Ftracker.webtorrent.io%3A80'
Diffstat (limited to 'bin')
-rw-r--r-- | bin/test.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/test.js b/bin/test.js index 2fc368b..2675c80 100644 --- a/bin/test.js +++ b/bin/test.js @@ -1,14 +1,14 @@ #!/usr/bin/env node -var cp = require('child_process') +var spawn = require('cross-spawn-async') var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST || process.env.TRAVIS_PULL_REQUEST === 'false' -var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' }) +var node = spawn('npm', ['run', 'test-node'], { stdio: 'inherit' }) node.on('close', function (code) { if (code === 0 && runBrowserTests) { - var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' }) + var browser = spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' }) browser.on('close', function (code) { process.exit(code) }) |