Skip to main content
Module

x/denops_test/mod.ts

🌿 Test helper module for denops.vim
Go to Latest
import * as denopsTest from "https://deno.land/x/denops_test@v1.0.2/mod.ts";

Deno module for testing denops.vim. This module is assumed to be used in unittests of denops plugin.

import { assert, assertFalse } from "https://deno.land/std/testing/asserts.ts";
import { test } from "./mod.ts";

test(
  "vim",
  "test(mode:vim) start vim to test denops features",
  async (denops) => {
    assertFalse(await denops.call("has", "nvim"));
  },
);

test({
  mode: "nvim",
  name: "test(mode:nvim) start nvim to test denops features",
  fn: async (denops) => {
    assert(await denops.call("has", "nvim"));
  },
});

Functions

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

Function to be executed by passing a denops instance for testing to the specified function

Interfaces

Test definition used in test function

Options for withDenops function