Skip to content

Commit

Permalink
return promises in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Dec 10, 2024
1 parent cac80b8 commit ecb932b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions catalog/app/containers/Bucket/requests/object.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ describe('app/containers/Bucket/requests/object', () => {
} as S3.Types.ListObjectVersionsOutput),
}),
}
it('return object versions', () => {
it('return object versions', () =>
expect(
objectVersions({ s3: s3 as S3, bucket: 'any', path: 'foo' }),
).resolves.toMatchSnapshot()
})
).resolves.toMatchSnapshot())
})

describe('fetchFile', () => {
Expand Down Expand Up @@ -122,7 +121,7 @@ describe('app/containers/Bucket/requests/object', () => {
s3: s3 as S3,
handle: { bucket: 'b', key: 'does-not-exist' },
})
expect(result).rejects.toThrow(FileNotFound)
return expect(result).rejects.toThrow(FileNotFound)
})

it('re-throws on error', async () => {
Expand All @@ -132,7 +131,7 @@ describe('app/containers/Bucket/requests/object', () => {
s3: s3 as S3,
handle: { bucket: 'b', key: 'error' },
})
expect(result).rejects.toThrow(Error)
return expect(result).rejects.toThrow(Error)
})
})
})

0 comments on commit ecb932b

Please sign in to comment.