Skip to content

Commit

Permalink
馃挭 Use Entrypoint style in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed May 14, 2024
1 parent 74116b9 commit d236844
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions denops/@denops-private/testdata/dummy_invalid_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_core@v6.0.5/mod.ts";
import type { Entrypoint } from "https://deno.land/x/denops_core@v6.1.0/mod.ts";

export function main(_denops: Denops): Promise<void> {
export const main: Entrypoint = (_denops) => {
throw new Error("This is dummy error");
}
};
6 changes: 3 additions & 3 deletions denops/@denops-private/testdata/dummy_valid_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Denops } from "https://deno.land/x/denops_core@v6.0.5/mod.ts";
import type { Entrypoint } from "https://deno.land/x/denops_core@v6.1.0/mod.ts";

export async function main(denops: Denops): Promise<void> {
export const main: Entrypoint = async (denops) => {
denops.dispatcher = {
test: async (...args) => {
await denops.cmd(`echo 'This is test call: ${JSON.stringify(args)}'`);
},
};
await denops.cmd("echo 'Hello, Denops!'");
}
};

0 comments on commit d236844

Please sign in to comment.