test: improve test coverage (#6387)

* test: improve test coverage

* fix

* use posixPath
This commit is contained in:
Joshua Chen 2022-01-18 16:29:40 +08:00 committed by GitHub
parent a9810db1cc
commit 62223ee556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 463 additions and 60 deletions

View file

@ -22,8 +22,9 @@ module.exports = function creator() {
return;
}
const sameProperties =
decl.parent.nodes.filter((n) => n.prop === decl.prop) || [];
const sameProperties = decl.parent.nodes.filter(
(n) => n.prop === decl.prop,
);
const hasImportantProperties = sameProperties.some((p) =>
Object.prototype.hasOwnProperty.call(p, 'important'),
);