-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Noticed this while implementing #23 in test/standalone.js:
describe('Pass a SelectorList into calculate', () => {
const selectorLists = csstree.findAll(ast, (node) => node.type === 'SelectorList');
deepEqual(Specificity.calculate(selectorLists[0])[0].toObject(), { a: 1, b: 0, c: 1 });
deepEqual(Specificity.calculate(selectorLists[0])[1].toObject(), { a: 0, b: 2, c: 0 });
deepEqual(Specificity.calculate(selectorLists[1])[0].toObject(), { a: 0, b: 0, c: 1 });
});Where I think that it should be this instead:
describe('Pass a SelectorList into calculate', () => {
const selectorLists = csstree.findAll(ast, (node) => node.type === 'SelectorList');
deepEqual(calculate(selectorLists[0])[0].toObject(), { a: 1, b: 0, c: 1 });
deepEqual(calculate(selectorLists[0])[1].toObject(), { a: 0, b: 2, c: 0 });
deepEqual(calculate(selectorLists[1])[0].toObject(), { a: 0, b: 0, c: 1 });
});Removing the Specificity. part still makes the tests pass. Happy to create a PR if this is the correct way.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels