Skip to content
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

Fix CSS test on base property definitions #1273

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/css/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe(`The curated view of CSS extracts`, () => {
before(async () => {
const all = await css.listAll({ folder: curatedFolder });
const baseProperties = {};
const basePropertiesInDeltaSpecs = {};
const extendedProperties = {};
const selectors = {};
const valuespaces = {};
Expand All @@ -51,6 +52,12 @@ describe(`The curated view of CSS extracts`, () => {
}
baseProperties[name].push({ spec: data.spec, dfn: desc });
}
else if ((type === 'property') && (spec.seriesComposition === 'delta') && !desc.newValues) {
if (!basePropertiesInDeltaSpecs[name]) {
basePropertiesInDeltaSpecs[name] = [];
}
basePropertiesInDeltaSpecs[name].push({ spec: data.spec, dfn: desc });
}
else if ((type === 'extended property') && desc[value]) {
if (!extendedProperties[name]) {
extendedProperties[name] = [];
Expand Down Expand Up @@ -154,7 +161,7 @@ describe(`The curated view of CSS extracts`, () => {
describe(`Looking at extended CSS properties, the curated view`, () => {
for (const [name, dfns] of Object.entries(extendedProperties)) {
it(`contains a base definition for the "${name}" property`, () => {
assert(baseProperties[name], 'no base definition found');
assert(baseProperties[name] || basePropertiesInDeltaSpecs[name], 'no base definition found');
});
}
});
Expand Down