diff --git a/denops/skkeleton/config_test.ts b/denops/skkeleton/config_test.ts index 156a15e0..6bdc63df 100644 --- a/denops/skkeleton/config_test.ts +++ b/denops/skkeleton/config_test.ts @@ -1,13 +1,14 @@ import { config } from "./config.ts"; import { Context } from "./context.ts"; import { Denops } from "./deps.ts"; -import { assertEquals } from "./deps/std/assert.ts"; import { disable } from "./function/disable.ts"; import { katakana } from "./function/mode.ts"; import { dispatch } from "./function/testutil.ts"; import { currentContext, currentLibrary, variables } from "./store.ts"; import { test } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + const defaultConfig = { ...config }; const lib = await currentLibrary.get(); diff --git a/denops/skkeleton/deps/std/assert.ts b/denops/skkeleton/deps/std/assert.ts deleted file mode 100644 index 49ad0912..00000000 --- a/denops/skkeleton/deps/std/assert.ts +++ /dev/null @@ -1 +0,0 @@ -export { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; diff --git a/denops/skkeleton/dictionary_test.ts b/denops/skkeleton/dictionary_test.ts index 0bea3721..82735e0a 100644 --- a/denops/skkeleton/dictionary_test.ts +++ b/denops/skkeleton/dictionary_test.ts @@ -1,9 +1,9 @@ -import { assertEquals } from "./deps/std/assert.ts"; import { Dictionary, Library, wrapDictionary } from "./dictionary.ts"; import { Dictionary as SkkDictionary } from "./sources/skk_dictionary.ts"; import { Dictionary as DenoKvDictionary } from "./sources/deno_kv.ts"; import { Dictionary as UserDictionary } from "./sources/user_dictionary.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; import { dirname } from "jsr:@std/path@~1.0.3/dirname"; import { fromFileUrl } from "jsr:@std/path@~1.0.3/from-file-url"; import { join } from "jsr:@std/path@~1.0.3/join"; diff --git a/denops/skkeleton/function/common_test.ts b/denops/skkeleton/function/common_test.ts index 3dacd6ec..d582f06b 100644 --- a/denops/skkeleton/function/common_test.ts +++ b/denops/skkeleton/function/common_test.ts @@ -1,11 +1,12 @@ import { config } from "../config.ts"; import { Context } from "../context.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { currentLibrary } from "../store.ts"; import { cancel, kakutei, kakuteiKey } from "./common.ts"; import { katakana } from "./mode.ts"; import { dispatch } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + const lib = await currentLibrary.get(); await lib.registerHenkanResult("okurinasi", "あ", "い"); diff --git a/denops/skkeleton/function/dictionary_test.ts b/denops/skkeleton/function/dictionary_test.ts index 785a2067..f4f7efb5 100644 --- a/denops/skkeleton/function/dictionary_test.ts +++ b/denops/skkeleton/function/dictionary_test.ts @@ -1,11 +1,12 @@ import { Denops } from "../deps.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { currentKanaTable, getKanaTable } from "../kana.ts"; import { HenkanState } from "../state.ts"; import { currentContext } from "../store.ts"; import { test } from "../testutil.ts"; import { registerWord } from "./dictionary.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + test({ mode: "all", name: "Don't put string when register dictionary was cancelled", diff --git a/denops/skkeleton/function/disable_test.ts b/denops/skkeleton/function/disable_test.ts index 0239fa1b..1168f24f 100644 --- a/denops/skkeleton/function/disable_test.ts +++ b/denops/skkeleton/function/disable_test.ts @@ -1,9 +1,10 @@ import { Denops } from "../deps.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { currentContext } from "../store.ts"; import { test } from "../testutil.ts"; import { dispatch } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + // deno-lint-ignore no-explicit-any async function getResult(x: Promise): Promise { return (await x)?.result; diff --git a/denops/skkeleton/function/henkan_test.ts b/denops/skkeleton/function/henkan_test.ts index 4fbaaeac..2e27e05c 100644 --- a/denops/skkeleton/function/henkan_test.ts +++ b/denops/skkeleton/function/henkan_test.ts @@ -1,8 +1,9 @@ import { Context } from "../context.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { currentLibrary } from "../store.ts"; import { dispatch } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + const l = await currentLibrary.get(); await l.registerHenkanResult("okurinasi", "へんかん", "返還"); await l.registerHenkanResult("okurinasi", "へんかん", "変換"); diff --git a/denops/skkeleton/function/input_test.ts b/denops/skkeleton/function/input_test.ts index 3e6c377e..5e79b8f4 100644 --- a/denops/skkeleton/function/input_test.ts +++ b/denops/skkeleton/function/input_test.ts @@ -1,13 +1,14 @@ import { config } from "../config.ts"; import { Context } from "../context.ts"; import { Denops, op } from "../deps.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { test } from "../testutil.ts"; import { kakutei } from "./common.ts"; import { deleteChar, henkanPoint } from "./input.ts"; import { hankatakana, katakana } from "./mode.ts"; import { dispatch } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + Deno.test({ name: "kana input", async fn() { diff --git a/denops/skkeleton/function/mode_test.ts b/denops/skkeleton/function/mode_test.ts index 23a8920d..385a42ea 100644 --- a/denops/skkeleton/function/mode_test.ts +++ b/denops/skkeleton/function/mode_test.ts @@ -1,5 +1,4 @@ import { autocmd, Denops, vars } from "../deps.ts"; -import { assertEquals } from "../deps/std/assert.ts"; import { currentKanaTable } from "../kana.ts"; import { currentLibrary } from "../store.ts"; import { currentContext } from "../store.ts"; @@ -9,6 +8,8 @@ import { deleteChar, kanaInput } from "./input.ts"; import { abbrev, hankatakana, katakana, zenkaku } from "./mode.ts"; import { dispatch } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + test({ mode: "all", name: "Can get skkeleton mode", diff --git a/denops/skkeleton/kana_test.ts b/denops/skkeleton/kana_test.ts index de0e2fc9..c13fd030 100644 --- a/denops/skkeleton/kana_test.ts +++ b/denops/skkeleton/kana_test.ts @@ -1,11 +1,13 @@ +import { Denops } from "./deps.ts"; import { config } from "./config.ts"; import { Context } from "./context.ts"; -import { assertEquals } from "./deps/std/assert.ts"; import { dispatch } from "./function/testutil.ts"; import { registerKanaTable } from "./kana.ts"; import { currentContext } from "./store.ts"; import { test } from "./testutil.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + Deno.test({ name: "customize kanatable", async fn() { @@ -34,7 +36,7 @@ Deno.test({ test({ mode: "all", name: "create kanatable", - async fn(denops) { + async fn(denops: Denops) { registerKanaTable("test", { a: ["hoge", ""], }, true); diff --git a/denops/skkeleton/keymap_test.ts b/denops/skkeleton/keymap_test.ts index 928f1a84..c3b2c922 100644 --- a/denops/skkeleton/keymap_test.ts +++ b/denops/skkeleton/keymap_test.ts @@ -1,12 +1,14 @@ +import { Denops } from "./deps.ts"; import { test } from "./testutil.ts"; -import { assertEquals } from "./deps/std/assert.ts"; import { currentLibrary } from "./store.ts"; import { currentContext } from "./store.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + test({ mode: "nvim", // can input mode test only in nvim name: "registerKeyMap", - async fn(denops) { + async fn(denops: Denops) { const lib = await currentLibrary.get(); lib.registerHenkanResult("okurinasi", "あ", "亜"); await denops.cmd('call skkeleton#register_keymap("henkan", "x", "")'); diff --git a/denops/skkeleton/preedit_test.ts b/denops/skkeleton/preedit_test.ts index d72f7054..b23b9662 100644 --- a/denops/skkeleton/preedit_test.ts +++ b/denops/skkeleton/preedit_test.ts @@ -1,6 +1,7 @@ -import { assertEquals } from "./deps/std/assert.ts"; import { PreEdit } from "./preedit.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + Deno.test({ name: "preedit test", fn() { diff --git a/denops/skkeleton/util_test.ts b/denops/skkeleton/util_test.ts index da764ea3..2a9d9ea5 100644 --- a/denops/skkeleton/util_test.ts +++ b/denops/skkeleton/util_test.ts @@ -1,6 +1,7 @@ -import { assertEquals } from "./deps/std/assert.ts"; import { LazyCell } from "./util.ts"; +import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; + Deno.test({ name: "LazyCell", async fn(t) {