import { test } from "https://deno.land/x/denops_test@v1.6.2/tester.ts";
Registers a test for Denops to be run when deno test
is used.
To use this function, the environment variable DENOPS_TEST_DENOPS_PATH
must be set to the
local path to the denops.vim
repository.
The DENOPS_TEST_VIM_EXECUTABLE
and DENOPS_TEST_NVIM_EXECUTABLE
environment variables
allow you to change the Vim/Neovim execution command (default is vim
and nvim
respectively).
Note that this is a time-consuming process, especially on Windows, since this function internally spawns Vim/Neovim sub-process, which performs the tests.
This function internally uses Deno.test
and withDenops
to run
tests by passing a denops
instance to the registered test function.
import { assert, assertFalse } from "https://deno.land/std@0.210.0/assert/mod.ts";
import { test } from "https://deno.land/x/denops_test@v1.6.2/mod.ts";
test("vim", "Test with Vim", async (denops) => {
assertFalse(await denops.call("has", "nvim"));
});
Registers a test for Denops to be run when deno test
is used.
To use this function, the environment variable DENOPS_TEST_DENOPS_PATH
must be set to the
local path to the denops.vim
repository.
The DENOPS_TEST_VIM_EXECUTABLE
and DENOPS_TEST_NVIM_EXECUTABLE
environment variables
allow you to change the Vim/Neovim execution command (default is vim
and nvim
respectively).
Note that this is a time-consuming process, especially on Windows, since this function internally spawns Vim/Neovim sub-process, which performs the tests.
This function internally uses Deno.test
and withDenops
to run
tests by passing a denops
instance to the registered test function.
import { assert, assertFalse } from "https://deno.land/std@0.210.0/assert/mod.ts";
import { test } from "https://deno.land/x/denops_test@v1.6.2/mod.ts";
test({
mode: "nvim",
name: "Test with Neovim",
fn: async (denops) => {
assert(await denops.call("has", "nvim"));
},
});