diff --git a/package.json b/package.json index a9ddf16..e7946cd 100644 --- a/package.json +++ b/package.json @@ -82,10 +82,10 @@ "dependencies": { "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", - "chalk": "^3.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.21", + "picocolors": "^1.1.1", "redent": "^3.0.0" }, "devDependencies": { diff --git a/src/to-have-style.js b/src/to-have-style.js index 010e2a5..bf292d8 100644 --- a/src/to-have-style.js +++ b/src/to-have-style.js @@ -1,4 +1,4 @@ -import chalk from 'chalk' +import picocolors from 'picocolors' import {checkHtmlElement, parseCSS} from './utils' function getStyleDeclaration(document, css) { @@ -50,7 +50,7 @@ function expectedDiff(diffFn, expected, computedStyles) { ) const diffOutput = diffFn(printoutStyles(expected), printoutStyles(received)) // Remove the "+ Received" annotation because this is a one-way diff - return diffOutput.replace(`${chalk.red('+ Received')}\n`, '') + return diffOutput.replace(`${picocolors.red('+ Received')}\n`, '') } export function toHaveStyle(htmlElement, css) {