@@ -8,50 +8,44 @@ describe('angularVitePlugin', () => {
8
8
} ) ;
9
9
10
10
describe ( 'isTestWatchMode' , ( ) => {
11
- it ( 'should return false if vitest command not included in the command' , ( ) => {
12
- const result = isTestWatchMode ( 'vite' ) ;
13
-
14
- expect ( result ) . toBeFalsy ( ) ;
15
- } ) ;
16
-
17
11
it ( 'should return false for vitest --run' , ( ) => {
18
- const result = isTestWatchMode ( 'vitest' , [ '--run' ] ) ;
12
+ const result = isTestWatchMode ( [ '--run' ] ) ;
19
13
20
14
expect ( result ) . toBeFalsy ( ) ;
21
15
} ) ;
22
16
23
17
it ( 'should return true for vitest --no-run' , ( ) => {
24
- const result = isTestWatchMode ( 'vitest' , [ '--no-run' ] ) ;
18
+ const result = isTestWatchMode ( [ '--no-run' ] ) ;
25
19
26
20
expect ( result ) . toBeTruthy ( ) ;
27
21
} ) ;
28
22
29
23
it ( 'should return true for vitest --watch' , ( ) => {
30
- const result = isTestWatchMode ( 'vitest' , [ '--watch' ] ) ;
24
+ const result = isTestWatchMode ( [ '--watch' ] ) ;
31
25
32
26
expect ( result ) . toBeTruthy ( ) ;
33
27
} ) ;
34
28
35
29
it ( 'should return true for vitest watch' , ( ) => {
36
- const result = isTestWatchMode ( 'vitest' , [ 'watch' ] ) ;
30
+ const result = isTestWatchMode ( [ 'watch' ] ) ;
37
31
38
32
expect ( result ) . toBeTruthy ( ) ;
39
33
} ) ;
40
34
41
35
it ( 'should return false for vitest --no-watch' , ( ) => {
42
- const result = isTestWatchMode ( 'vitest' , [ '--no-watch' ] ) ;
36
+ const result = isTestWatchMode ( [ '--no-watch' ] ) ;
43
37
44
38
expect ( result ) . toBeFalsy ( ) ;
45
39
} ) ;
46
40
47
41
it ( 'should return false for vitest --watch=false' , ( ) => {
48
- const result = isTestWatchMode ( 'vitest' , [ '--watch=false' ] ) ;
42
+ const result = isTestWatchMode ( [ '--watch=false' ] ) ;
49
43
50
44
expect ( result ) . toBeFalsy ( ) ;
51
45
} ) ;
52
46
53
47
it ( 'should return false for vitest --watch false' , ( ) => {
54
- const result = isTestWatchMode ( 'vitest' , [ '--watch' , 'false' ] ) ;
48
+ const result = isTestWatchMode ( [ '--watch' , 'false' ] ) ;
55
49
56
50
expect ( result ) . toBeFalsy ( ) ;
57
51
} ) ;
0 commit comments