Merge pull request +13152 from c9/vfs-empty-strings

fix issue with vfs worker not passing falsy values
pull/284/head
Harutyun Amirjanyan 2016-04-04 17:00:29 +04:00
commit effccd1d60
2 zmienionych plików z 17 dodań i 6 usunięć

2
node_modules/vfs-socket/worker.js wygenerowano vendored
Wyświetl plik

@ -437,7 +437,7 @@ function Worker(vfs) {
var keys = Object.keys(meta || {});
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
if (!meta[key])
if (meta[key] == undefined)
continue;
switch (key) {
case "stream": token.stream = storeStream(meta.stream); break;

Wyświetl plik

@ -37,7 +37,7 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai)
describe('proc', function() {
describe('spawn()', function() {
this.timeout(4000);
this.timeout(10000);
it("should spawn a child process", function(done) {
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
//Another test - see that cwd defaults to the root vfs dir when resolve is set to true
// 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('execFile()', function() {
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
//Another test - see that cwd defaults to the root vfs dir when resolve is set to true
it('should pass stdout and stderr', function(done) {
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() {
this.timeout(30000);