Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoseph Frazier <joseph@onsip.com>2015-10-04 23:56:13 +0300
committerJoseph Frazier <joseph@onsip.com>2015-10-04 23:57:16 +0300
commit22e487f36e7cc97f3f6c553b548b4597e3472b11 (patch)
tree8ee36922058ff8d7b87f6aa1bb67623e9b3514be /test
parentb3055504fffc1990f2d0745655da690ae23ff05b (diff)
exec/spawn cmd.js with 'node'
See https://github.com/feross/webtorrent/issues/429#issuecomment-139878312 > This is because a windows system doesn't use the shebang so it might > not know how to execute a js file. Spawning using node and node will > understand how to read this.
Diffstat (limited to 'test')
-rw-r--r--test/cmd.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/cmd.js b/test/cmd.js
index 686d013..abba4c2 100644
--- a/test/cmd.js
+++ b/test/cmd.js
@@ -4,7 +4,8 @@ var fs = require('fs')
var parseTorrent = require('parse-torrent')
var test = require('tape')
-var CMD = path.resolve(__dirname, '..', 'bin', 'cmd.js')
+var CMD_PATH = path.resolve(__dirname, '..', 'bin', 'cmd.js')
+var CMD = 'node ' + CMD_PATH
test('Command line: webtorrent help', function (t) {
t.plan(6)
@@ -83,7 +84,7 @@ test('Command line: webtorrent create /path/to/file', function (t) {
var leavesPath = path.resolve(__dirname, 'content', 'Leaves of Grass by Walt Whitman.epub')
- var child = cp.spawn(CMD, [ 'create', leavesPath ])
+ var child = cp.spawn('node', [ CMD_PATH, 'create', leavesPath ])
child.on('error', function (err) { t.fail(err) })
var chunks = []