Skip to content

Commit 5db8663

Browse files
authored
feat: only import parse function from css package
1 parent 2c2ff96 commit 5db8663

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/toHaveStyle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { parse } from 'css';
1+
import cssParse from 'css/lib/parse';
22
import { checkHtmlElement, getTag, InvalidCSSError } from './utils';
33
import { printSecSuccess, printSuccess, printSecError, printError } from './printers';
44

55
function parseCSS(css, ...args) {
6-
const ast = parse(`selector { ${css} }`, {
6+
const ast = cssParse(`selector { ${css} }`, {
77
silent: true,
88
}).stylesheet;
99
if (ast.parsingErrors && ast.parsingErrors.length > 0) {

0 commit comments

Comments
 (0)