Skip to content

Commit ffd78df

Browse files
committed
Use expect().toThrow()
1 parent a7fdfb8 commit ffd78df

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

__tests__/main.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,7 @@ describe('getDescribeAssetsOptions', () => {
208208
})
209209

210210
test('getDescribeAssetsOptions: unsupported option throws', () => {
211-
try {
212-
getDescribeAssetsOptions('unsupported options')
213-
fail('should fail with unsupported options')
214-
} catch (e) {
215-
// pass
216-
}
211+
expect(() => getDescribeAssetsOptions('unsupported options')).toThrow()
217212
})
218213

219214
// generate all combinations of sections as string

0 commit comments

Comments
 (0)