Skip to main content
Go to Latest
function test
import { test } from "https://deno.land/x/denops_lsputil@v0.6.2/deps.ts";

Register a test for denops to be run when deno test is used.

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/testing/asserts.ts";
import { test } from "./tester.ts";

test("vim", "Test with Vim", async (denops) => {
  assertFalse(await denops.call("has", "nvim"));
});

test({
  mode: "nvim",
  name: "Test with Neovim",
  fn: async (denops) => {
    assert(await denops.call("has", "nvim"));
  },
});

Parameters

mode: TestDefinition["mode"]
name: string
fn: TestDefinition["fn"]

Parameters

def: TestDefinition