test.command.executableSubcommandAlias.js
This file
Path
test/test.command.executableSubcommandAlias.js
28 lines · 788 bytes · JavaScript
Last changed by
Merge branch 'pr/545'zhiyeleebefore adoptionc6236d9
History of this fileTake it
1234567891011121314151617181920212223242526272829var exec = require('child_process').exec , path = require('path') , should = require('should');
var bin = path.join(__dirname, './fixtures/pm')
// success caseexec(bin + ' i', function (error, stdout, stderr) { stdout.should.equal('install\n');});
// subcommand bin file with explicit extensionexec(bin + ' p', function (error, stdout, stderr) { stdout.should.equal('publish\n');});
// spawn EACCESexec(bin + ' s', function (error, stdout, stderr) { // error info are not the same in between <v0.10 and v0.12 should.notEqual(0, stderr.length);});
// when `bin` is a symbol link for mocking global installvar bin = path.join(__dirname, './fixtures/pmlink')// success caseexec(bin + ' i', function (error, stdout, stderr) { stdout.should.equal('install\n');});