FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-java/testAsyncOptions/clientBeforeError.test.ts at master · joeferner/node-java · GitHub
joeferner
/
node-java
Public
Notifications
You must be signed in to change notification settings
Fork
288
Star
1.9k
Code
Issues
208
Pull requests
7
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
node-java
/
testAsyncOptions
/
clientBeforeError.test.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (31 loc) · 981 Bytes
Breadcrumbs
node-java
/
testAsyncOptions
/
clientBeforeError.test.ts
Copy path
File metadata and controls
35 lines (31 loc) · 981 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
import
{
describe
,
expect
,
test
}
from
"vitest"
;
import
{
getJava
}
from
"../testHelpers"
;
describe
(
"clientBeforeError"
,
(
)
=>
{
test
(
"clientBeforeError"
,
async
(
)
=>
{
await
getJava
(
{
syncSuffix
:
"Sync"
,
}
,
{
beforeInit
:
async
(
java
)
=>
{
expect
(
java
.
isJvmCreated
(
)
)
.
toBeFalsy
(
)
;
function
before
(
callback
:
(
err
:
Error
)
=>
void
)
:
void
{
expect
(
java
.
isJvmCreated
(
)
)
.
toBeFalsy
(
)
;
callback
(
new
Error
(
"dummy error"
)
)
;
}
java
.
registerClient
(
before
)
;
await
new
Promise
<
void
>
(
(
resolve
)
=>
{
java
.
ensureJvm
(
(
err
)
=>
{
expect
(
err
)
.
toBeTruthy
(
)
;
expect
(
typeof
err
)
.
toBe
(
"object"
)
;
expect
(
err
)
.
toBeInstanceOf
(
Error
)
;
expect
(
err
?.
message
)
.
toBe
(
"dummy error"
)
;
expect
(
java
.
isJvmCreated
(
)
)
.
toBeFalsy
(
)
;
resolve
(
)
;
}
)
;
}
)
;
}
,
}
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL