Skip to content

Commit 707e647

Browse files
perf: replace chalk with picocolors (#659)
1 parent 918b6fb commit 707e647

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@
8282
"dependencies": {
8383
"@adobe/css-tools": "^4.4.0",
8484
"aria-query": "^5.0.0",
85-
"chalk": "^3.0.0",
8685
"css.escape": "^1.5.1",
8786
"dom-accessibility-api": "^0.6.3",
8887
"lodash": "^4.17.21",
88+
"picocolors": "^1.1.1",
8989
"redent": "^3.0.0"
9090
},
9191
"devDependencies": {

src/to-have-style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from 'chalk'
1+
import pico from 'picocolors'
22
import {checkHtmlElement, parseCSS} from './utils'
33

44
function getStyleDeclaration(document, css) {
@@ -50,7 +50,7 @@ function expectedDiff(diffFn, expected, computedStyles) {
5050
)
5151
const diffOutput = diffFn(printoutStyles(expected), printoutStyles(received))
5252
// Remove the "+ Received" annotation because this is a one-way diff
53-
return diffOutput.replace(`${chalk.red('+ Received')}\n`, '')
53+
return diffOutput.replace(`${pico.red('+ Received')}\n`, '')
5454
}
5555

5656
export function toHaveStyle(htmlElement, css) {

0 commit comments

Comments
 (0)