Skip to content

Commit baf92da

Browse files
committed
test: remove invalid css that was causing issues with the postcss parser
These tests happened to use garbage "{c}" declaration lists which caused the parser to choke. Given that we already have tests demonstrating similar behavior and that's not what these tests were meant to demonstrate, I've updated them to use empty declaration lists. (cherry picked from commit b1699da)
1 parent 1c6553e commit baf92da

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/compiler/test/shadow_css/shadow_css_spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -369,30 +369,30 @@ describe('ShadowCss', () => {
369369
// Comments should be kept in the same position as otherwise inline sourcemaps break due to
370370
// shift in lines.
371371
it('should remove inline comments without adding extra lines', () => {
372-
expect(shim('/* b {c} */ b {c}', 'contenta')).toBe(' b[contenta] {c}');
372+
expect(shim('/* b {} */ b {}', 'contenta')).toBe(' b[contenta] {}');
373373
});
374374

375375
it('should preserve internal newlines from multiline comments', () => {
376-
expect(shim('/* b {c}\n */ b {c}', 'contenta')).toBe('\n b[contenta] {c}');
376+
expect(shim('/* b {}\n */ b {}', 'contenta')).toBe('\n b[contenta] {}');
377377
});
378378

379379
it('should remove multiple inline comments without adding extra lines', () => {
380-
expect(shim('/* b {c} */ b {c} /* a {c} */ a {c}', 'contenta')).toBe(
381-
' b[contenta] {c} a[contenta] {c}',
380+
expect(shim('/* b {} */ b {} /* a {} */ a {}', 'contenta')).toBe(
381+
' b[contenta] {} a[contenta] {}',
382382
);
383383
});
384384

385385
it('should keep sourceMappingURL comments', () => {
386-
expect(shim('b {c} /*# sourceMappingURL=data:x */', 'contenta')).toBe(
387-
'b[contenta] {c} /*# sourceMappingURL=data:x */',
386+
expect(shim('b {} /*# sourceMappingURL=data:x */', 'contenta')).toBe(
387+
'b[contenta] {} /*# sourceMappingURL=data:x */',
388388
);
389-
expect(shim('b {c}/* #sourceMappingURL=data:x */', 'contenta')).toBe(
390-
'b[contenta] {c}/* #sourceMappingURL=data:x */',
389+
expect(shim('b {}/* #sourceMappingURL=data:x */', 'contenta')).toBe(
390+
'b[contenta] {}/* #sourceMappingURL=data:x */',
391391
);
392392
});
393393

394394
it('should handle adjacent comments', () => {
395-
expect(shim('/* comment 1 */ /* comment 2 */ b {c}', 'contenta')).toBe(' b[contenta] {c}');
395+
expect(shim('/* comment 1 */ /* comment 2 */ b {}', 'contenta')).toBe(' b[contenta] {}');
396396
});
397397
});
398398
});

0 commit comments

Comments
 (0)