Skip to content

Commit

Permalink
Remove jest 'resolves' matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Apr 15, 2021
1 parent 2fa8725 commit 257fc97
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ describe('util', () => {

describe('safelyExecute', () => {
it('should swallow errors', async () => {
await expect(
util.safelyExecute(() => {
expect(
await util.safelyExecute(() => {
throw new Error('ahh');
}),
).resolves.toBeUndefined();
).toBeUndefined();
});

it('should call retry function', async () => {
Expand All @@ -124,11 +124,11 @@ describe('util', () => {

describe('safelyExecuteWithTimeout', () => {
it('should swallow errors', async () => {
await expect(
util.safelyExecuteWithTimeout(() => {
expect(
await util.safelyExecuteWithTimeout(() => {
throw new Error('ahh');
}),
).resolves.toBeUndefined();
).toBeUndefined();
});

it('should resolve', async () => {
Expand All @@ -139,11 +139,11 @@ describe('util', () => {
});

it('should timeout', async () => {
await expect(
util.safelyExecuteWithTimeout(() => {
expect(
await util.safelyExecuteWithTimeout(() => {
return new Promise((res) => setTimeout(res, 800));
}),
).resolves.toBeUndefined();
).toBeUndefined();
});
});

Expand Down

0 comments on commit 257fc97

Please sign in to comment.