Skip to content

Commit 1d42aee

Browse files
committed
🐛 no --ignore-declarations
1 parent 5c37d5b commit 1d42aee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"pretest": "sass --source-map ./test/test.scss ./test/test.css",
66
"test": "./bin/css-coverage.js --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
7-
"test-debug": "node --inspect-brk ./bin/css-coverage.js --cover-declarations --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov",
7+
"test-debug": "node --inspect-brk ./bin/css-coverage.js --cover-declarations --html ./test/test.html --css ./test/test.css --lcov ./test/test.lcov --ignore-declarations 'move-to,move-foobar'",
88
"posttest": "standard --fix"
99
},
1010
"dependencies": {

src/runCoverage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ cssTree.walkRules(ast, (rule) => {
8181
} else if (rule.type === 'Rule') {
8282
const converted = rule.prelude.children.map((selector) => {
8383
rule.block.children.each(declaration => {
84-
if (commander.ignoreDeclarations.indexOf(declaration.property.toLowerCase()) >= 0) {
84+
if (commander.ignoreDeclarations && commander.ignoreDeclarations.indexOf(declaration.property.toLowerCase()) >= 0) {
8585
return // skip because it is ignored
8686
}
8787
// Append to a list of locations

0 commit comments

Comments
 (0)