Skip to content

Commit e4cf362

Browse files
committed
code coverage update, update version
1 parent 74bb01a commit e4cf362

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-sys",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Universal package installer, get the command for managing packages, or auto install any package, using one command for all platforms. Automate the installation of macOS Brew, and Windows Chocolatey package managers. A promisify child process of spawn.",
55
"type": "module",
66
"main": "index.js",

test/test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,20 @@ describe('Method: `installer` and progress callback, platform set to `win64`', f
217217

218218
describe('Method: `spawning`', function () {
219219
it('should return on successful install with output from `progress`', function (done) {
220-
spawning('echo', [''], (object) => {
220+
let cmd = process.platform == 'win32' ? 'echo | set /p dummyName=1' : 'printf 1';
221+
spawning(cmd, [], (object) => {
221222
expect(object).to.be.a('object');
222223
expect(object.handle).to.be.instanceOf(Object);
223224
expect(object.output).to.be.a('string');
224-
return 'hello';
225+
return object.output + ' hello';
225226
}, { stdio: 'pipe', shell: true })
226227
.then(function (data) {
227228
expect(data).to.be.a('string');
228-
expect(data).to.equal('hello');
229+
expect(data).to.equal('1 hello');
229230
done();
230231
})
231232
.catch(function (err) {
233+
console.log(err);
232234
expect(err).to.be.empty;
233235
done();
234236
});
@@ -253,7 +255,7 @@ describe('Method: `spawning`', function () {
253255
});
254256

255257
it('should return on successful install with output from `onprogress`', function (done) {
256-
spawning('echo', [''], {
258+
spawning('echo', [''], null, {
257259
stdio: 'pipe',
258260
shell: true,
259261
onerror: (err) => { return 'testing: ' + err; },

0 commit comments

Comments
 (0)