From 84df112267066e359740f183ebcafe38bfad35fe Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 23 Jan 2023 11:07:17 +0100 Subject: [PATCH] chore: fix css test --- test/css/test/scope-module.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/css/test/scope-module.spec.ts b/test/css/test/scope-module.spec.ts index 1d3da3ab22df..4dfc786f23d0 100644 --- a/test/css/test/scope-module.spec.ts +++ b/test/css/test/scope-module.spec.ts @@ -16,11 +16,13 @@ test('module is processed and scoped', async () => { /> `) - element.className = `${styles.module} ${styles.main}` - const computedModules = window.getComputedStyle(element) + const mangledElement = document.createElement('div') + + mangledElement.className = `${styles.module} ${styles.main}` + const computedModules = window.getComputedStyle(mangledElement) expect(computedModules.display).toBe('flex') expect(computedModules.width).toBe('100px') - expect(element).toMatchInlineSnapshot(` + expect(mangledElement).toMatchInlineSnapshot(`