Skip to content

Commit 6fa0f8c

Browse files
committed
chore: re-enable watch test on windows
1 parent 3e8a826 commit 6fa0f8c

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

playground/assets/__tests__/assets.spec.ts

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
getColor,
99
isBuild,
1010
isServe,
11-
isWindows,
1211
listAssets,
1312
notifyRebuildComplete,
1413
page,
@@ -634,35 +633,31 @@ test.runIf(isBuild)('manifest', async () => {
634633
}
635634
})
636635

637-
// TODO: skip on Windows due to https://github.com/rolldown/rolldown/issues/4385
638-
describe.runIf(isBuild && !isWindows)(
639-
'css and assets in css in build watch',
640-
() => {
641-
test('css will not be lost and css does not contain undefined', async () => {
642-
editFile('index.html', (code) => code.replace('Assets', 'assets'))
643-
await notifyRebuildComplete(watcher)
644-
const cssFile = findAssetFile(/index-[-\w]+\.css$/, 'foo')
645-
expect(cssFile).not.toBe('')
646-
expect(cssFile).not.toMatch(/undefined/)
647-
})
636+
describe.runIf(isBuild)('css and assets in css in build watch', () => {
637+
test('css will not be lost and css does not contain undefined', async () => {
638+
editFile('index.html', (code) => code.replace('Assets', 'assets'))
639+
await notifyRebuildComplete(watcher)
640+
const cssFile = findAssetFile(/index-[-\w]+\.css$/, 'foo')
641+
expect(cssFile).not.toBe('')
642+
expect(cssFile).not.toMatch(/undefined/)
643+
})
648644

649-
test('import module.css', async () => {
650-
expect(await getColor('#foo')).toBe('red')
651-
editFile('css/foo.module.css', (code) => code.replace('red', 'blue'))
652-
await notifyRebuildComplete(watcher)
653-
await page.reload()
654-
expect(await getColor('#foo')).toBe('blue')
655-
})
645+
test('import module.css', async () => {
646+
expect(await getColor('#foo')).toBe('red')
647+
editFile('css/foo.module.css', (code) => code.replace('red', 'blue'))
648+
await notifyRebuildComplete(watcher)
649+
await page.reload()
650+
expect(await getColor('#foo')).toBe('blue')
651+
})
656652

657-
test('import with raw query', async () => {
658-
expect(await page.textContent('.raw-query')).toBe('foo')
659-
editFile('static/foo.txt', (code) => code.replace('foo', 'zoo'))
660-
await notifyRebuildComplete(watcher)
661-
await page.reload()
662-
expect(await page.textContent('.raw-query')).toBe('zoo')
663-
})
664-
},
665-
)
653+
test('import with raw query', async () => {
654+
expect(await page.textContent('.raw-query')).toBe('foo')
655+
editFile('static/foo.txt', (code) => code.replace('foo', 'zoo'))
656+
await notifyRebuildComplete(watcher)
657+
await page.reload()
658+
expect(await page.textContent('.raw-query')).toBe('zoo')
659+
})
660+
})
666661

667662
test('inline style test', async () => {
668663
expect(await getBg('.inline-style')).toMatch(assetMatch)

0 commit comments

Comments
 (0)