Skip to content

Commit

Permalink
fix: unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykcieszkowski committed Jun 29, 2022
1 parent 2376a74 commit 6d4d0ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/unit/cmd/dns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('dns command', () => {
const expectedResult = getCmdMockResult(testCase);

// eslint-disable-next-line prefer-promise-reject-errors
const mockCmd = Promise.reject({stderr: rawOutput});
const mockCmd = Promise.reject({stdout: rawOutput, stderr: ''});

const dns = new DnsCommand((): any => mockCmd);
await dns.run(mockSocket as any, 'measurement', 'test', options);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cmd/mtr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('mtr command executor', () => {
};

const expectedResult = getCmdMockResult(testCase);
const mockCmd = execaPromise({stdout: new PassThrough()}, Promise.resolve());
const mockCmd = execaPromise({stdout: new PassThrough(), kill: () => null}, Promise.resolve());

const mtr = new MtrCommand((): any => mockCmd, dnsResolver(true));
await mtr.run(mockedSocket as any, 'measurement', 'test', options as MtrOptions);
Expand Down

0 comments on commit 6d4d0ff

Please sign in to comment.