Skip to content

Commit ba11c57

Browse files
committed
Partially restore 86bffe3
Restore separating the tests of CSS-wide keywords from the tests of whole value substitutions. This is actually an oversight in aed1b6c.
1 parent 79be4a1 commit ba11c57

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

__tests__/style.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,15 @@ describe('CSSStyleDeclaration.setProperty(), CSSStyleDeclaration.getPropertyValu
371371
})
372372
})
373373

374+
describe('CSS-wide keywords', () => {
375+
test('valid', () => {
376+
const style = createStyleBlock()
377+
substitutions.keywords.forEach(keyword => {
378+
style.opacity = keyword.toUpperCase()
379+
expect(style.opacity).toBe(keyword)
380+
})
381+
})
382+
})
374383
describe('arbitrary substitution', () => {
375384
test('invalid', () => {
376385
const style = createStyleBlock()
@@ -426,7 +435,6 @@ describe('<whole-value>', () => {
426435
const style = createStyleBlock()
427436
const invalid = [
428437
// Not the <whole-value>
429-
['initial initial', 'margin'],
430438
['first-valid(0) 0', 'margin'],
431439
['interpolate(0, 0: 0) 0', 'margin'],
432440
['interpolate(0, 0: first-valid(0) 0)', 'margin'],
@@ -449,8 +457,6 @@ describe('<whole-value>', () => {
449457
test('valid', () => {
450458
const style = createStyleBlock()
451459
const valid = [
452-
// CSS-wide keywords
453-
...substitutions.keywords.map(keyword => [keyword.toUpperCase(), keyword, 'opacity']),
454460
// Resolved at parse time
455461
['FIRST-VALID(1)', '1', 'opacity'],
456462
// Serialize the list of tokens

0 commit comments

Comments
 (0)