Skip to content

Commit

Permalink
test: stricter test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Aug 23, 2022
1 parent 2007017 commit 5be730c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions __tests__/cmds/docs/edit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('rdme docs:edit', () => {

const versionMock = getAPIMock().get(`/api/v1/version/${version}`).basicAuth({ user: key }).reply(200, { version });

await expect(docsEdit.run({ slug, key, version: '1.0.0' })).rejects.toThrow(new APIError(errorObject));
await expect(docsEdit.run({ slug, key, version: '1.0.0' })).rejects.toStrictEqual(new APIError(errorObject));

getMock.done();
versionMock.done();
Expand All @@ -103,7 +103,9 @@ describe('rdme docs:edit', () => {
return cb(0);
}

await expect(docsEdit.run({ slug, key, version: '1.0.0', mockEditor })).rejects.toThrow(new APIError(errorObject));
await expect(docsEdit.run({ slug, key, version: '1.0.0', mockEditor })).rejects.toStrictEqual(
new APIError(errorObject)
);

getMock.done();
putMock.done();
Expand Down

0 comments on commit 5be730c

Please sign in to comment.