update cssom package to rrweb self-owned package 'rrweb-cssom' (#925)

* test: update cssom package to rrweb self-owned package 'rrweb-cssom'

* style: remove outdated comments
This commit is contained in:
Yun Feng
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 77e86d1f20
commit dc7578b3fb
3 changed files with 7 additions and 9 deletions

View File

@@ -1210,9 +1210,7 @@ describe('diff algorithm for rrdom', () => {
expect(styleEl.sheet?.cssRules[0].cssText).toEqual('div {color: black;}');
});
// JSDOM/CSSOM is currently broken for this test
// remove '.skip' once https://github.com/NV/CSSOM/pull/113#issue-712485075 is merged
it.skip('should insert rule at index [0,0] and keep existing rules', () => {
it('should insert rule at index [0,0] and keep existing rules', () => {
document.write(`
<style>
@media {
@@ -1229,10 +1227,6 @@ describe('diff algorithm for rrdom', () => {
];
applyVirtualStyleRulesToNode(styleEl, virtualStyleRules);
console.log(
Array.from((styleEl.sheet?.cssRules[0] as CSSMediaRule).cssRules),
);
expect(
(styleEl.sheet?.cssRules[0] as CSSMediaRule).cssRules?.length,
).toEqual(3);