mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
19 lines
611 B
TypeScript
19 lines
611 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { editFile, isBuild, isBundledDev, page } from '~utils'
|
|
|
|
export const tests = () => {
|
|
test.skipIf(isBundledDev)(
|
|
'should re-run transform when dependencies are edited',
|
|
async () => {
|
|
expect(await page.textContent('#transform-count')).toBe('1')
|
|
|
|
if (isBuild) return
|
|
editFile('plugin-dep.js', (str) => str + ' ')
|
|
await expect.poll(() => page.textContent('#transform-count')).toBe('2')
|
|
|
|
editFile('plugin-dep-load.js', (str) => str + ' ')
|
|
await expect.poll(() => page.textContent('#transform-count')).toBe('3')
|
|
},
|
|
)
|
|
}
|