-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle addWatchFile in load hooks
- Loading branch information
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
playground/transform-plugin/__tests__/transform-plugin.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { expect, test } from 'vitest' | ||
import { editFile, page, untilUpdated } from '~utils' | ||
|
||
test('should re-run transform when plugin-dep file is edited', async () => { | ||
test('should re-run transform when dependencies are edited', async () => { | ||
expect(await page.textContent('#transform-count')).toBe('1') | ||
|
||
await editFile('plugin-dep.js', (str) => str) | ||
editFile('plugin-dep.js', (str) => str) | ||
await untilUpdated(() => page.textContent('#transform-count'), '2') | ||
|
||
editFile('plugin-dep-load.js', (str) => str) | ||
await untilUpdated(() => page.textContent('#transform-count'), '3') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Empty file for detecting changes in tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters