Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/jsr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: jsr

env:
DENO_VERSION: 1.x
DENO_VERSION: 2.x

on:
push:
Expand All @@ -19,9 +19,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish
run: |
deno run -A jsr:@david/publish-on-tag@0.1.3
deno run -A jsr:@david/publish-on-tag@0.2.0
34 changes: 12 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
runner:
- ubuntu-latest
deno_version:
- "1.x"
- "2.x"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'

- uses: actions/checkout@v4

- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: "${{ matrix.deno_version }}"

Expand Down Expand Up @@ -77,21 +77,23 @@ jobs:
- macos-latest
- ubuntu-latest
deno_version:
- "1.45.0"
- "1.x"
- "~2.3"
- "2.x"
host_version:
- vim: "v9.1.0448"
nvim: "v0.10.0"
- vim: "v9.1.1646"
nvim: "v0.11.3"

runs-on: ${{ matrix.runner }}

steps:
- run: git config --global core.autocrlf false
- run: |
git config --global core.autocrlf false
git config --global core.eol lf
if: runner.os == 'Windows'

- uses: actions/checkout@v4

- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno_version }}

Expand Down Expand Up @@ -133,26 +135,14 @@ jobs:
deno cache ./mod.ts

- name: Run tests
run: deno task test:coverage
run: deno task test --coverage=cov
timeout-minutes: 15

- run: |
deno task coverage --lcov > coverage.lcov
deno coverage --lcov cov > coverage.lcov

- uses: codecov/codecov-action@v4
with:
os: ${{ runner.os }}
files: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}

jsr-publish:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: "1.x"
- name: Publish (dry-run)
run: |
deno publish --dry-run
19 changes: 0 additions & 19 deletions .github/workflows/update.yml

This file was deleted.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[![Test](https://github.com/vim-denops/deno-denops-test/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-test/actions/workflows/test.yml)
[![codecov](https://codecov.io/github/vim-denops/deno-denops-test/branch/main/graph/badge.svg?token=X9O5XB4O1S)](https://codecov.io/github/vim-denops/deno-denops-test)

[![Deno 1.45.0 or above](https://img.shields.io/badge/Deno-Support%201.45.0-yellowgreen.svg?logo=deno)](https://github.com/denoland/deno/tree/v1.45.0)
[![Vim 9.1.0448 or above](https://img.shields.io/badge/Vim-Support%209.1.0448-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.1.0448)
[![Neovim 0.10.0 or above](https://img.shields.io/badge/Neovim-Support%200.10.0-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.10.0)
[![Deno 2.3.0 or above](https://img.shields.io/badge/Deno-Support%202.3.0-yellowgreen.svg?logo=deno)](https://github.com/denoland/deno/tree/v2.3.0)
[![Vim 9.1.1646 or above](https://img.shields.io/badge/Vim-Support%209.1.1646-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.1.1646)
[![Neovim 0.11.3 or above](https://img.shields.io/badge/Neovim-Support%200.11.3-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.11.3)

A [Deno] module designed for testing [denops.vim]. This module is intended to be
used in the unit tests of denops plugins.
Expand Down Expand Up @@ -125,11 +125,11 @@ jobs:
- macos-latest
- ubuntu-latest
deno_version:
- "1.45.0"
- "1.x"
- "~2.3"
- "2.x"
host_version:
- vim: "v9.1.0448"
nvim: "v0.10.0"
- vim: "v9.1.1646"
nvim: "v0.11.3"

runs-on: ${{ matrix.runner }}

Expand All @@ -139,7 +139,7 @@ jobs:

- uses: actions/checkout@v4

- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno_version }}

Expand Down
15 changes: 7 additions & 8 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"name": "@denops/test",
"version": "0.0.0",
"exports": {
".": "./mod.ts",
"./stub": "./stub.ts",
"./tester": "./tester.ts",
"./with": "./with.ts"
},
"exclude": [
".coverage"
],
"publish": {
"include": [
"**/*.ts",
Expand All @@ -25,13 +21,16 @@
"check": "deno check **/*.ts",
"check:doc": "deno test --doc --no-run",
"test": "deno test -A --parallel --shuffle",
"test:coverage": "deno task test --coverage=.coverage",
"coverage": "deno coverage .coverage",
"update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts",
"update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint",
"apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts"
},
"imports": {
"jsr:@denops/test": "./mod.ts"
},
"lint": {
"rules": {
"exclude": [
"no-import-prefix"
]
}
}
}
2 changes: 1 addition & 1 deletion denops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
Denops,
Dispatcher,
Meta,
} from "jsr:@denops/core@^7.0.0";
} from "jsr:@denops/core@^8.0.0";
import type { Client } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1";

export class DenopsImpl implements Denops {
Expand Down
2 changes: 1 addition & 1 deletion plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Denops } from "jsr:@denops/core@^7.0.0";
import type { Denops } from "jsr:@denops/core@^8.0.0";
import { as, assert, ensure, is } from "jsr:@core/unknownutil@^4.0.0";
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1";
import { errorDeserializer, errorSerializer } from "./error.ts";
Expand Down
2 changes: 1 addition & 1 deletion stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
Denops,
Dispatcher,
Meta,
} from "jsr:@denops/core@^7.0.0";
} from "jsr:@denops/core@^8.0.0";

/**
* Represents a stubber object for `Denops`.
Expand Down
2 changes: 1 addition & 1 deletion stub_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertSpyCall, spy } from "jsr:@std/testing@^1.0.0/mock";
import { assertEquals } from "jsr:@std/assert@^1.0.0";
import type { Denops } from "jsr:@denops/core@^7.0.0";
import type { Denops } from "jsr:@denops/core@^8.0.0";
import { DenopsStub } from "./stub.ts";

Deno.test("`DenopsStub`", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tester.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sample } from "jsr:@std/collections@^1.0.5/sample";
import type { Denops } from "jsr:@denops/core@^7.0.0";
import type { Denops } from "jsr:@denops/core@^8.0.0";
import type { RunMode } from "./runner.ts";
import { withDenops } from "./with.ts";

Expand Down
2 changes: 1 addition & 1 deletion with.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { deadline } from "jsr:@std/async@^1.0.0/deadline";
import { assert, is } from "jsr:@core/unknownutil@^4.0.0";
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1";
import type { Denops, Meta } from "jsr:@denops/core@^7.0.0";
import type { Denops, Meta } from "jsr:@denops/core@^8.0.0";
import { getConfig } from "./conf.ts";
import { run, type RunMode } from "./runner.ts";
import { DenopsImpl } from "./denops.ts";
Expand Down
2 changes: 1 addition & 1 deletion with_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
assertRejects,
} from "jsr:@std/assert@^1.0.0";
import { assertSpyCalls, spy, stub } from "jsr:@std/testing@^1.0.0/mock";
import type { Denops } from "jsr:@denops/core@^7.0.0";
import type { Denops } from "jsr:@denops/core@^8.0.0";
import { withDenops } from "./with.ts";

Deno.test("test(mode:vim) start vim to test denops features", async () => {
Expand Down
Loading