Skip to content

Commit 84df112

Browse files
committed
chore: fix css test
1 parent e28b9b9 commit 84df112

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/css/test/scope-module.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ test('module is processed and scoped', async () => {
1616
/>
1717
`)
1818

19-
element.className = `${styles.module} ${styles.main}`
20-
const computedModules = window.getComputedStyle(element)
19+
const mangledElement = document.createElement('div')
20+
21+
mangledElement.className = `${styles.module} ${styles.main}`
22+
const computedModules = window.getComputedStyle(mangledElement)
2123
expect(computedModules.display).toBe('flex')
2224
expect(computedModules.width).toBe('100px')
23-
expect(element).toMatchInlineSnapshot(`
25+
expect(mangledElement).toMatchInlineSnapshot(`
2426
<div
2527
class="_module_19cso_5 _main_19cso_1"
2628
/>

0 commit comments

Comments
 (0)