Skip to content

Commit

Permalink
chore: fix css test
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 23, 2023
1 parent e28b9b9 commit 84df112
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/css/test/scope-module.spec.ts
Expand Up @@ -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(`
<div
class="_module_19cso_5 _main_19cso_1"
/>
Expand Down

0 comments on commit 84df112

Please sign in to comment.