FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
github/test/assert-transforms.test.js at master · atom/github · GitHub
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
atom
/
github
Public archive
Notifications
You must be signed in to change notification settings
Fork
408
Star
1.2k
Code
Issues
439
Pull requests
65
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
github
/
test
/
assert-transforms.test.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (40 loc) · 1.16 KB
Breadcrumbs
github
/
test
/
assert-transforms.test.js
Copy path
File metadata and controls
46 lines (40 loc) · 1.16 KB
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
45
46
describe
(
'assert.async'
,
function
(
)
{
it
(
'allows for asynchronous assertions'
,
async
function
(
)
{
let
val
=
false
;
setTimeout
(
(
)
=>
{
val
=
true
;
}
)
;
await
assert
.
async
.
isTrue
(
val
)
;
}
)
;
it
(
'allows for setting the timeout'
,
async
function
(
)
{
let
val
=
false
;
setTimeout
(
(
)
=>
{
val
=
true
;
}
,
100
)
;
let
caught
=
false
;
try
{
await
assert
.
async
(
50
)
.
isTrue
(
val
)
;
}
catch
(
err
)
{
caught
=
true
;
}
assert
.
isTrue
(
caught
)
;
}
)
;
it
(
'retains the assertion message and adds the timeout'
,
async
function
(
)
{
let
val
=
false
;
setTimeout
(
(
)
=>
{
val
=
true
;
}
,
100
)
;
let
caught
=
null
;
try
{
await
assert
.
async
(
50
)
.
isTrue
(
val
)
;
}
catch
(
err
)
{
caught
=
err
;
}
assert
.
match
(
caught
.
message
,
/
^
a
s
y
n
c
\(
5
0
m
s
\)
:
/
)
;
assert
.
match
(
caught
.
message
,
/
a
s
s
e
r
t
\.
i
s
T
r
u
e
\(
v
a
l
\)
/
)
;
assert
.
match
(
caught
.
message
,
/
f
a
l
s
e
.
*
t
r
u
e
/
)
;
}
)
;
it
(
'includes the assert line in the exception, even for non-async assertions'
,
function
(
)
{
let
caught
=
null
;
try
{
assert
.
equal
(
1
,
2
)
;
}
catch
(
err
)
{
caught
=
err
;
}
assert
.
match
(
caught
.
message
,
/
a
s
s
e
r
t
\.
e
q
u
a
l
\(
1
,
2
\)
/
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL