Skip to content

Commit 7a8acc5

Browse files
dopped pluginContext import from test
1 parent 4283231 commit 7a8acc5

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"devDependencies": {
3737
"@types/node": "^22.0.0",
3838
"typescript": "^5.8.3",
39-
"vite": "^8.0.0",
39+
"vite": "^8.0.8",
4040
"vitest": "^4.1.3"
4141
},
4242
"peerDependencies": {

test/plugin.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { beforeEach, describe, expect, it, TestOptions } from 'vitest';
22
import scalaJSPlugin, { ScalaJSPluginOptions } from "../index";
3-
import type { PluginContext } from 'rolldown';
3+
44

55
/* This interface refines the VitePlugin with some knowledge about our
66
* particular implementation, for easier testing. If we define here something
@@ -9,8 +9,8 @@ import type { PluginContext } from 'rolldown';
99
*/
1010
interface RefinedPlugin {
1111
configResolved: (this: void, resolvedConfig: { mode: string }) => void | Promise<void>;
12-
buildStart: (this: PluginContext, options: {}) => void | Promise<void>;
13-
resolveId: (this: PluginContext, source: string) => string | Promise<string>;
12+
buildStart: (this: any, options: {}) => void | Promise<void>;
13+
resolveId: (this: any, source: string) => string | Promise<string>;
1414
}
1515

1616
function normalizeSlashes(path: string | null): string | null {
@@ -27,14 +27,14 @@ describe("scalaJSPlugin", () => {
2727
timeout: 60000, // running sbt takes time
2828
};
2929

30-
const setup: (options: ScalaJSPluginOptions) => [RefinedPlugin, PluginContext] = (options) => {
30+
const setup: (options: ScalaJSPluginOptions) => [RefinedPlugin, any] = (options) => {
3131
const rawPlugin = scalaJSPlugin({ cwd: cwd, ...options }) as any;
3232
const plugin = {
3333
configResolved: typeof rawPlugin.configResolved === 'function' ? rawPlugin.configResolved : rawPlugin.configResolved?.handler,
3434
buildStart: typeof rawPlugin.buildStart === 'function' ? rawPlugin.buildStart : rawPlugin.buildStart?.handler,
3535
resolveId: typeof rawPlugin.resolveId === 'function' ? rawPlugin.resolveId : rawPlugin.resolveId?.handler,
3636
} as RefinedPlugin;
37-
const fakePluginContext = {} as PluginContext;
37+
const fakePluginContext = {} as any;
3838
return [plugin, fakePluginContext];
3939
}
4040

0 commit comments

Comments
 (0)