Fixing tests

- Make scripts output expected content (rather than the bash user!)
- Reduce noise
- Ensure the exec it quoted appropriately
This commit is contained in:
Remy Sharp
2015-01-16 09:49:15 +00:00
parent 299b1a698a
commit 3b8cea480a
3 changed files with 7 additions and 7 deletions

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env node
console.log(process.env.USER || 'OK');
console.log('OK');

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env node
console.log(process.env.USER || 'OK');
console.log('OK');

View File

@@ -34,7 +34,7 @@ describe('nodemon fork', function () {
done(new Error(data));
},
output: function (data) {
process.stdout.write(data);
// process.stdout.write(data);
if (data.trim() === 'OK') {
found = true;
}
@@ -64,7 +64,7 @@ it('should start a fork exec with quotes and escaping', function (done) {
done(new Error(data));
},
output: function (data) {
process.stdout.write(data);
// process.stdout.write(data);
if (data.trim() === 'OK') {
found = true;
}
@@ -87,14 +87,14 @@ it('should start a fork exec with spaces and slashes', function (done) {
var p = run({
exec: 'bin/nodemon.js',
// make nodemon verbose so we can check the filters being applied
args: ['-q', '--exec', 'test/fixtures/some\ \\file']
args: ['-q', '--exec', '"test/fixtures/some\ \\file"']
}, {
error: function (data) {
p.send('quit');
done(new Error(data));
},
output: function (data) {
process.stdout.write(data);
// process.stdout.write(data);
if (data.trim() === 'OK') {
found = true;
}
@@ -153,7 +153,7 @@ it('should start a fork exec with spaces and slashes', function (done) {
done(new Error(data));
},
output: function (data) {
process.stdout.write(data);
// process.stdout.write(data);
if (data.trim() === 'foo') {
found = true;
}