FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/test/parallel/test-assert-fail.js at main · fetchapi/node · GitHub
fetchapi
/
node
Public
forked from
nodejs/node
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
test
/
parallel
/
test-assert-fail.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (39 loc) · 892 Bytes
Breadcrumbs
node
/
test
/
parallel
/
test-assert-fail.js
Copy path
File metadata and controls
44 lines (39 loc) · 892 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict'
;
const
common
=
require
(
'../common'
)
;
const
assert
=
require
(
'assert'
)
;
// No args
assert
.
throws
(
(
)
=>
{
assert
.
fail
(
)
;
}
,
{
code
:
'ERR_ASSERTION'
,
name
:
'AssertionError'
,
message
:
'Failed'
,
operator
:
'fail'
,
actual
:
undefined
,
expected
:
undefined
,
generatedMessage
:
true
,
stack
:
/
F
a
i
l
e
d
/
}
)
;
// One arg = message
assert
.
throws
(
(
)
=>
{
assert
.
fail
(
'custom message'
)
;
}
,
{
code
:
'ERR_ASSERTION'
,
name
:
'AssertionError'
,
message
:
'custom message'
,
operator
:
'fail'
,
actual
:
undefined
,
expected
:
undefined
,
generatedMessage
:
false
}
)
;
// One arg = Error
assert
.
throws
(
(
)
=>
{
assert
.
fail
(
new
TypeError
(
'custom message'
)
)
;
}
,
{
name
:
'TypeError'
,
message
:
'custom message'
}
)
;
Object
.
prototype
.
get
=
common
.
mustNotCall
(
)
;
assert
.
throws
(
(
)
=>
assert
.
fail
(
''
)
,
{
code
:
'ERR_ASSERTION'
}
)
;
delete
Object
.
prototype
.
get
;
Back
|
FazBrowse Home
|
New Git URL