Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010302
assert-throws-async.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
327 B
Referenced Files
None
Subscribers
None
assert-throws-async.ts
View Options
import
assert
from
"assert"
;
export
async
function
assertThrowsAsync
(
fn
:
()
=>
Promise
<
any
>
,
error_handler
:
(
e
:
any
)
=>
Promise
<
any
>
|
any
)
{
let
error
=
null
;
try
{
await
fn
();
}
catch
(
e
)
{
error
=
e
;
}
finally
{
assert
.
notStrictEqual
(
error
,
null
,
"It didn't throw"
);
await
error_handler
(
error
as
any
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:40 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
634622
Default Alt Text
assert-throws-async.ts (327 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment