GithubHelp home page GithubHelp logo

denocy.vim's Introduction

denocy.vim

An end-to-end testing library for Vim/Neovim powered by denops.vim, inspired by modern Javascript testing frameworks like Cypress.

screenshot

Key Features

  • Pseudo-Synchronous API
    • Easy to write/read
    • Run denops plugins synchronously as much as possible
  • (TODO) Asynchronous API
  • Human-readable selectors and matchers optimized for Vim

Requirements

  • Latest Deno runtime
  • Git (unless you use your own clone of denops.vim)

Installation

Installation is not required, since Denocy is a Deno module. You can use Denocy by importing it remotely like other Deno modules (see Getting Started).

Configuration

Denocy is supposed to work with zero configuration, but the following environment variables are available to tweak:

DENOCY_DIR

Path to a directory where Denocy caches temporary files (default: ~/.cache/denocy)

DENOCY_VIM_PATH

Path to Vim executable (default: vim)

DENOCY_NVIM_PATH

Path to Neovim executable (default: nvim)

DENOPS_PATH

Path to a cloned repository of denops.vim (default: ~/.cache/denocy/denops.vim)

Getting Started

Use Denocy

import { test } from "https://pax.deno.dev/hasundue/denocy.vim/mod.ts";

This will clone the denops.vim repository into DENOCY_DIR (default: ~/.cache/denocy) and set environment variables required to use the test module of Denops.

denocy.vim's People

Contributors

hasundue avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

denocy.vim's Issues

Failed to run test file with error [email protected]/mod.ts' does not provide an export named 'assertArray'

Hello
I tried to run the following test

import { test } from "https://pax.deno.dev/hasundue/denocy.vim/mod.ts";

test("Sample", { target: "all" }, (vim) => {
  vim.cmd('echo "foo"')
});

but execution fails with the following error

error: Uncaught SyntaxError: The requested module 'https://deno.land/x/[email protected]/mod.ts' does not provide an export named 'assertArray'
  assertArray,
  ^
    at <anonymous> (https://raw.githubusercontent.com/hasundue/denocy.vim/master/deps.ts:15:3)

Could the code be trying to use a deprecated function from this library or is some other kind of issue?

Refactor

  • Migrate to denops_test module
  • Use autocmd to trigger assertions
  • Use docker
  • Redesign assertion APIs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.