kopia lustrzana https://github.com/c9/core
add test for execfile
rodzic
525d3e5b99
commit
f904da1073
|
@ -37,7 +37,7 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai)
|
||||||
|
|
||||||
describe('proc', function() {
|
describe('proc', function() {
|
||||||
describe('spawn()', function() {
|
describe('spawn()', function() {
|
||||||
this.timeout(4000);
|
this.timeout(10000);
|
||||||
|
|
||||||
it("should spawn a child process", function(done) {
|
it("should spawn a child process", function(done) {
|
||||||
var args = ["-e", "process.stdin.pipe(process.stdout);try{process.stdin.resume()}catch(e) {};"];
|
var args = ["-e", "process.stdin.pipe(process.stdout);try{process.stdin.resume()}catch(e) {};"];
|
||||||
|
@ -66,8 +66,8 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//should test the kill() method - which is broken now
|
// should test the kill() method - which is broken now
|
||||||
//Another test - see that cwd defaults to the root vfs dir when resolve is set to true
|
// Another test - see that cwd defaults to the root vfs dir when resolve is set to true
|
||||||
});
|
});
|
||||||
describe('execFile()', function() {
|
describe('execFile()', function() {
|
||||||
this.timeout(10000);
|
this.timeout(10000);
|
||||||
|
@ -101,8 +101,19 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//should test the kill() method - which is broken now
|
it('should pass stdout and stderr', function(done) {
|
||||||
//Another test - see that cwd defaults to the root vfs dir when resolve is set to true
|
proc.execFile("node", {
|
||||||
|
args: ["-v"]
|
||||||
|
}, function(e, stdout, stderr) {
|
||||||
|
expect(stdout[0]).to.equal("v");
|
||||||
|
expect(stderr).to.equal("");
|
||||||
|
expect(e).to.not.ok;
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// should test the kill() method - which is broken now
|
||||||
|
// Another test - see that cwd defaults to the root vfs dir when resolve is set to true
|
||||||
});
|
});
|
||||||
describe('pty()', function() {
|
describe('pty()', function() {
|
||||||
this.timeout(30000);
|
this.timeout(30000);
|
||||||
|
|
Ładowanie…
Reference in New Issue