mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
14 lines
292 B
TypeScript
14 lines
292 B
TypeScript
import { afterEach, beforeEach } from 'vitest'
|
|
|
|
function removeStyles() {
|
|
document.head.querySelectorAll('style').forEach(style => style.remove())
|
|
}
|
|
export function useRemoveStyles() {
|
|
beforeEach(() => removeStyles())
|
|
afterEach(() => removeStyles())
|
|
|
|
return {
|
|
removeStyles,
|
|
}
|
|
}
|