@@ -3,55 +3,57 @@ import { execSync } from 'node:child_process';
3
3
import path from 'node:path' ;
4
4
import process from 'node:process' ;
5
5
6
- test ( '$env/dynamic/private is not statically importable from the client' , ( ) => {
6
+ const timeout = 60_000 ;
7
+
8
+ test ( '$env/dynamic/private is not statically importable from the client' , { timeout } , ( ) => {
7
9
assert . throws (
8
10
( ) =>
9
11
execSync ( 'pnpm build' , {
10
12
cwd : path . join ( process . cwd ( ) , 'apps/private-dynamic-env' ) ,
11
13
stdio : 'pipe' ,
12
- timeout : 60000
14
+ timeout
13
15
} ) ,
14
16
/ .* C a n n o t i m p o r t \$ e n v \/ d y n a m i c \/ p r i v a t e i n t o c l i e n t - s i d e c o d e : .* / gs
15
17
) ;
16
18
} ) ;
17
19
18
- test ( '$env/dynamic/private is not dynamically importable from the client' , ( ) => {
20
+ test ( '$env/dynamic/private is not dynamically importable from the client' , { timeout } , ( ) => {
19
21
assert . throws (
20
22
( ) =>
21
23
execSync ( 'pnpm build' , {
22
24
cwd : path . join ( process . cwd ( ) , 'apps/private-dynamic-env-dynamic-import' ) ,
23
25
stdio : 'pipe' ,
24
- timeout : 60000
26
+ timeout
25
27
} ) ,
26
28
/ .* C a n n o t i m p o r t \$ e n v \/ d y n a m i c \/ p r i v a t e i n t o c l i e n t - s i d e c o d e : .* / gs
27
29
) ;
28
30
} ) ;
29
31
30
- test ( '$env/static/private is not statically importable from the client' , ( ) => {
32
+ test ( '$env/static/private is not statically importable from the client' , { timeout } , ( ) => {
31
33
assert . throws (
32
34
( ) =>
33
35
execSync ( 'pnpm build' , {
34
36
cwd : path . join ( process . cwd ( ) , 'apps/private-static-env' ) ,
35
37
stdio : 'pipe' ,
36
- timeout : 60000
38
+ timeout
37
39
} ) ,
38
40
/ .* C a n n o t i m p o r t \$ e n v \/ s t a t i c \/ p r i v a t e i n t o c l i e n t - s i d e c o d e : .* / gs
39
41
) ;
40
42
} ) ;
41
43
42
- test ( '$env/static/private is not dynamically importable from the client' , ( ) => {
44
+ test ( '$env/static/private is not dynamically importable from the client' , { timeout } , ( ) => {
43
45
assert . throws (
44
46
( ) =>
45
47
execSync ( 'pnpm build' , {
46
48
cwd : path . join ( process . cwd ( ) , 'apps/private-static-env-dynamic-import' ) ,
47
49
stdio : 'pipe' ,
48
- timeout : 60000
50
+ timeout
49
51
} ) ,
50
52
/ .* C a n n o t i m p o r t \$ e n v \/ s t a t i c \/ p r i v a t e i n t o c l i e n t - s i d e c o d e : .* / gs
51
53
) ;
52
54
} ) ;
53
55
54
- test ( '$env/dynamic/private is not importable from the service worker' , ( ) => {
56
+ test ( '$env/dynamic/private is not importable from the service worker' , { timeout } , ( ) => {
55
57
assert . throws (
56
58
( ) =>
57
59
execSync ( 'pnpm build' , {
@@ -63,13 +65,13 @@ test('$env/dynamic/private is not importable from the service worker', () => {
63
65
) ;
64
66
} ) ;
65
67
66
- test ( '$env/dynamic/public is not importable from the service worker' , ( ) => {
68
+ test ( '$env/dynamic/public is not importable from the service worker' , { timeout } , ( ) => {
67
69
assert . throws (
68
70
( ) =>
69
71
execSync ( 'pnpm build' , {
70
72
cwd : path . join ( process . cwd ( ) , 'apps/service-worker-dynamic-public-env' ) ,
71
73
stdio : 'pipe' ,
72
- timeout : 60000
74
+ timeout
73
75
} ) ,
74
76
/ .* C a n n o t i m p o r t \$ e n v \/ d y n a m i c \/ p u b l i c i n t o s e r v i c e - w o r k e r c o d e .* / gs
75
77
) ;
0 commit comments