fix(bgm): pass options arg to buildStart in unit test
Vite 8 (rolldown) changed buildStart to take (this, options), so the test's one-arg call failed typecheck. Add an ambient declaration for the fixture's virtual bgm modules so its entry typechecks in the editor.
This commit is contained in:
@@ -80,7 +80,9 @@ describe('bgm vite plugin', () => {
|
||||
const plugin = bgm({ root: gamesRoot });
|
||||
const watched: string[] = [];
|
||||
const context = { addWatchFile: (file: string) => watched.push(file) };
|
||||
(plugin.buildStart as Callable<typeof plugin.buildStart>).call(context);
|
||||
// Vite 8 (rolldown) `buildStart` takes `(this, options)`; the plugin ignores
|
||||
// the options, so pass a placeholder.
|
||||
(plugin.buildStart as Callable<typeof plugin.buildStart>).call(context, {} as never);
|
||||
|
||||
// Every def file (real + virtual code blocks) is watched so edits
|
||||
// trigger a re-collect.
|
||||
|
||||
Reference in New Issue
Block a user