Skip to content

Commit

Permalink
Test global binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 18, 2024
1 parent 547ab21 commit c815df1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,13 @@ test('Handles stderr error', async t => {
promise.subprocess.stderr.emit('error', error);
t.is(await t.throwsAsync(promise), error);
});

test('Can run global npm binaries', async t => {
const {stdout} = await nanoSpawn('npm', ['--version']);
t.regex(stdout, /^\d+\.\d+\.\d+/);
});

test('Can run OS binaries', async t => {
const {stdout} = await nanoSpawn('git', ['--version']);
t.regex(stdout, /^git version \d+\.\d+\.\d+/);
});

0 comments on commit c815df1

Please sign in to comment.