@@ -16,20 +16,19 @@ let server: Subprocess | undefined;
16
16
17
17
beforeAll ( async ( ) => {
18
18
server = Bun . spawn ( [ '../server/target/release/enstate' ] , {
19
- cwd : '' ,
20
- env : { ...process . env , RUST_LOG : 'info' } ,
19
+ env : { ...process . env , RUST_LOG : 'info' } ,
21
20
} ) ;
22
21
23
22
const decoder = new TextDecoder ( ) ;
24
23
25
24
// @ts -ignore
26
- server . stdout . pipeTo ( new WritableStream ( {
27
- write ( chunk ) {
28
- console . log ( decoder . decode ( chunk ) ) ;
29
- }
30
- } ) ) ;
31
-
32
- // console.log(server.stdout );
25
+ server . stdout . pipeTo (
26
+ new WritableStream ( {
27
+ write ( chunk ) {
28
+ console . log ( decoder . decode ( chunk ) ) ;
29
+ } ,
30
+ } )
31
+ ) ;
33
32
34
33
console . log ( 'Waiting for server to start...' ) ;
35
34
@@ -62,30 +61,40 @@ afterAll(async () => {
62
61
63
62
const PREFIX = 'server' ;
64
63
65
- test_implementation ( `${ PREFIX } /name` , http_fetch ( 'http://0.0.0.0:3000/n/' ) , dataset_name_single ) ;
64
+ test_implementation (
65
+ `${ PREFIX } /name` ,
66
+ // @ts -ignore
67
+ http_fetch ( 'http://0.0.0.0:3000/n/' ) ,
68
+ dataset_name_single
69
+ ) ;
66
70
test_implementation (
67
71
`${ PREFIX } /address` ,
72
+ // @ts -ignore
68
73
http_fetch ( 'http://0.0.0.0:3000/a/' ) ,
69
74
dataset_address_single
70
75
) ;
71
76
test_implementation (
72
77
`${ PREFIX } /universal` ,
78
+ // @ts -ignore
73
79
http_fetch ( 'http://0.0.0.0:3000/u/' ) ,
74
80
dataset_universal_single
75
81
) ;
76
82
77
83
test_implementation (
78
84
`${ PREFIX } /bulk/name` ,
85
+ // @ts -ignore
79
86
http_fetch ( 'http://0.0.0.0:3000/bulk/n?' ) ,
80
87
dataset_name_bulk
81
88
) ;
82
89
test_implementation (
83
90
`${ PREFIX } /bulk/address` ,
91
+ // @ts -ignore
84
92
http_fetch ( 'http://0.0.0.0:3000/bulk/a?' ) ,
85
93
dataset_address_bulk
86
94
) ;
87
95
test_implementation (
88
96
`${ PREFIX } /bulk/universal` ,
97
+ // @ts -ignore
89
98
http_fetch ( 'http://0.0.0.0:3000/bulk/u?' ) ,
90
99
dataset_universal_bulk
91
100
) ;
0 commit comments