Skip to content

#1 only import the cssParse function we need #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
4 changes: 2 additions & 2 deletions src/toHaveStyle.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { parse } from 'css';
import cssParse from 'css/lib/parse';
import { checkHtmlElement, getTag, InvalidCSSError } from './utils';
import { printSecSuccess, printSuccess, printSecError, printError } from './printers';

function parseCSS(css, ...args) {
const ast = parse(`selector { ${css} }`, {
const ast = cssParse(`selector { ${css} }`, {
silent: true,
}).stylesheet;
if (ast.parsingErrors && ast.parsingErrors.length > 0) {
Expand Down