Skip to content

Commit

Permalink
test: improve unit tests for inspectAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanwww committed Jun 3, 2024
1 parent c173e66 commit cd29774
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/RustlikeResult.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,10 @@ describe(`Test method \`${RustlikeResult.name}.prototype.${RustlikeResult.protot
const okResult = Ok(1);
const errResult = Err(0);

await expect(okResult.inspectAsync(fn1)).resolves.toStrictEqual(okResult);
await expect(errResult.inspectAsync(fn1)).resolves.toStrictEqual(errResult);
await expect(okResult.inspectAsync(fn2)).resolves.toStrictEqual(okResult);
await expect(errResult.inspectAsync(fn2)).resolves.toStrictEqual(errResult);
await expect(okResult.inspectAsync(fn1)).resolves.toBe(okResult);
await expect(errResult.inspectAsync(fn1)).resolves.toBe(errResult);
await expect(okResult.inspectAsync(fn2)).resolves.toBe(okResult);
await expect(errResult.inspectAsync(fn2)).resolves.toBe(errResult);
});

it('should inspect ok value', async () => {
Expand Down

0 comments on commit cd29774

Please sign in to comment.