1
- import chalk from 'chalk '
1
+ import { colors } from 'consola/utils '
2
2
import { describe , it , expect , vi , afterEach } from 'vitest'
3
3
4
4
import { useChecker } from '../src/runtime/validator'
@@ -29,7 +29,7 @@ describe('useChecker', () => {
29
29
30
30
await checker ( 'https://test.com/' , Symbol as any )
31
31
expect ( console . log ) . toHaveBeenCalledWith (
32
- `No HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
32
+ `No HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
33
33
)
34
34
expect ( console . warn ) . not . toHaveBeenCalled ( )
35
35
expect ( console . error ) . not . toHaveBeenCalled ( )
@@ -41,7 +41,7 @@ describe('useChecker', () => {
41
41
42
42
await checker ( 'https://test.com/' , Symbol as any )
43
43
expect ( console . log ) . toHaveBeenCalledWith (
44
- `No HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
44
+ `No HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
45
45
)
46
46
expect ( console . warn ) . not . toHaveBeenCalled ( )
47
47
expect ( console . error ) . not . toHaveBeenCalled ( )
@@ -91,7 +91,7 @@ describe('useChecker', () => {
91
91
expect ( console . log ) . not . toHaveBeenCalled ( )
92
92
expect ( console . warn ) . not . toHaveBeenCalled ( )
93
93
expect ( console . error ) . toHaveBeenCalledWith (
94
- `HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
94
+ `HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
95
95
)
96
96
} )
97
97
}
@@ -116,7 +116,7 @@ describe('useChecker', () => {
116
116
'<a>Link</a>' ,
117
117
)
118
118
expect ( console . log ) . toHaveBeenCalledWith (
119
- `No HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
119
+ `No HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
120
120
)
121
121
expect ( console . warn ) . not . toHaveBeenCalled ( )
122
122
expect ( console . error ) . not . toHaveBeenCalled ( )
@@ -134,7 +134,7 @@ describe('useChecker', () => {
134
134
'<a style="color:red" class="xxx">Link</a>' ,
135
135
)
136
136
expect ( console . log ) . toHaveBeenCalledWith (
137
- `No HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
137
+ `No HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
138
138
)
139
139
expect ( console . warn ) . not . toHaveBeenCalled ( )
140
140
expect ( console . error ) . not . toHaveBeenCalled ( )
@@ -162,7 +162,7 @@ describe('useChecker', () => {
162
162
expect ( console . log ) . not . toHaveBeenCalled ( )
163
163
expect ( console . warn ) . not . toHaveBeenCalled ( )
164
164
expect ( console . error ) . toHaveBeenCalledWith (
165
- `HTML validation errors found for ${ chalk . bold ( 'https://test.com/' ) } ` ,
165
+ `HTML validation errors found for ${ colors . bold ( 'https://test.com/' ) } ` ,
166
166
)
167
167
168
168
const validate = await import ( 'html-validate' )
0 commit comments