Skip to content

Commit

Permalink
chore: fix tests in recent node js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor committed Nov 6, 2024
1 parent 97ded39 commit 9521e2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ run.methods.forEach((method) => {
expect(err.message).toMatch('ENOENT');
expect(err.message).not.toMatch('undefined');
expect(err.code).toBe('ENOENT');
expect(err.errno).toBe('ENOENT');
expect(err.syscall).toMatch(syscall);
expect(err.syscall).not.toMatch('undefined');
expect(err.path).toMatch('somecommandthatwillneverexist');
Expand All @@ -256,7 +255,7 @@ run.methods.forEach((method) => {

if (run.isMethodSync(method)) {
it('should fail with ENOENT if the command does not exist', () => {
expect.assertions(9);
expect.assertions(8);

try {
run(method, 'somecommandthatwillneverexist', ['foo']);
Expand All @@ -266,7 +265,7 @@ run.methods.forEach((method) => {
});
} else {
it('should emit `error` and `close` if command does not exist', async () => {
expect.assertions(11);
expect.assertions(10);

await new Promise((resolve, reject) => {
const promise = run(method, 'somecommandthatwillneverexist', ['foo']);
Expand Down

0 comments on commit 9521e2d

Please sign in to comment.