Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80540 views
1
var concat = require('../../')
2
var spawn = require('child_process').spawn
3
var exec = require('child_process').exec
4
var test = require('tape')
5
6
test('ls command', function (t) {
7
t.plan(1)
8
var cmd = spawn('ls', [ __dirname ])
9
cmd.stdout.pipe(
10
concat(function(out) {
11
exec('ls ' + __dirname, function (err, body) {
12
t.equal(out.toString('utf8'), body.toString('utf8'))
13
})
14
})
15
)
16
})
17
18