Skip to content
Merged
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 authored and adamwathan committed Nov 7, 2024
commit f5cef93c3fc93b2fe73f0be56f6176e99c87c22f
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)'])
},
)