Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for :deep(…) in Vue scoped style blocks
  • Loading branch information
thecrypticace committed Oct 31, 2024
commit 35eb86dbf0bf14d8e37f4dc8c618ae71868ea187
12 changes: 10 additions & 2 deletions integrations/vite/vue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ test(
@apply text-red-500;
}
</style>

<style scoped>
@import 'tailwindcss/utilities';
@import 'tailwindcss/theme' theme(reference);
:deep(.bar) {
color: red;
}
</style>
<template>
<div class="underline foo">Hello Vue!</div>
<div class="underline foo bar">Hello Vue!</div>
</template>
`,
},
Expand All @@ -65,5 +71,7 @@ test(
expect(files).toHaveLength(1)

await fs.expectFileToContain(files[0][0], [candidate`underline`, candidate`foo`])

await fs.expectFileNotToContain(files[0][0], [':deep(.bar)'])
},
)