-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddc4c5c
commit def7121
Showing
16 changed files
with
84 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: jsr | ||
|
||
env: | ||
DENO_VERSION: 1.x | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ env.DENO_VERSION }} | ||
- name: Publish | ||
run: | | ||
deno run -A jsr:@david/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# 📝 denops_test | ||
|
||
[![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) | ||
[![jsr](https://jsr.io/badges/@denops/test)](https://jsr.io/@denops/test) | ||
[![denoland](https://img.shields.io/github/v/release/vim-denops/deno-denops-test?logo=deno&label=denoland)](https://deno.land/x/denops_test) | ||
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_test/mod.ts) | ||
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x/denops__test-lightgrey.svg?logo=deno)](https://deno.land/x/denops_test) | ||
[![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) | ||
|
||
A [Deno] module designed for testing [denops.vim]. This module is intended to be | ||
|
@@ -29,12 +30,8 @@ If you want to test denops plugins with a real Vim and/or Neovim process, use | |
the `test` function to define a test case, as shown below: | ||
|
||
```typescript | ||
import { | ||
assert, | ||
assertEquals, | ||
assertFalse, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { test } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
import { assert, assertEquals, assertFalse } from "jsr:@std/assert"; | ||
import { test } from "jsr:@denops/test"; | ||
|
||
test( | ||
"vim", | ||
|
@@ -74,8 +71,8 @@ the `DenopsStub` class to create a stub instance of the `Denops` interface, as | |
shown below: | ||
|
||
```typescript | ||
import { assertEquals } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { DenopsStub } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
import { assertEquals } from "jsr:@std/assert"; | ||
import { DenopsStub } from "jsr:@denops/test"; | ||
|
||
Deno.test("denops.call", async () => { | ||
const denops = new DenopsStub({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ import type { | |
Denops, | ||
Dispatcher, | ||
Meta, | ||
} from "https://deno.land/x/denops_core@v6.0.2/mod.ts"; | ||
import { Client } from "https://deno.land/x/[email protected]/mod.ts"; | ||
} from "jsr:@denops/core@^6.0.6"; | ||
import type { Client } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; | ||
|
||
export class DenopsImpl implements Denops { | ||
readonly name: string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,8 @@ | |
* assert, | ||
* assertEquals, | ||
* assertFalse, | ||
* } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
* import { test } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
* } from "jsr:@std/assert"; | ||
* import { test } from "jsr:@denops/test"; | ||
* | ||
* test( | ||
* "vim", | ||
|
@@ -68,8 +68,8 @@ | |
* shown below: | ||
* | ||
* ```typescript | ||
* import { assertEquals } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
* import { DenopsStub } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
* import { assertEquals } from "jsr:@std/assert"; | ||
* import { DenopsStub } from "jsr:@denops/test"; | ||
* | ||
* Deno.test("denops.call", async () => { | ||
* const denops = new DenopsStub({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
import type { Denops } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { | ||
assert, | ||
ensure, | ||
is, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { | ||
Client, | ||
Session, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
import type { Denops } from "jsr:@denops/core@^6.0.6"; | ||
import { assert, ensure, is } from "jsr:@core/[email protected]"; | ||
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; | ||
import { errorDeserializer, errorSerializer } from "./error.ts"; | ||
|
||
export async function main(denops: Denops): Promise<void> { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
import { | ||
assertSpyCall, | ||
spy, | ||
} from "https://deno.land/[email protected]/testing/mock.ts"; | ||
import { assertEquals } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { Denops } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { assertSpyCall, spy } from "jsr:@std/testing@^0.222.1/mock"; | ||
import { assertEquals } from "jsr:@std/assert@^0.222.1"; | ||
import type { Denops } from "jsr:@denops/core@^6.0.6"; | ||
import { DenopsStub } from "./stub.ts"; | ||
|
||
Deno.test("`DenopsStub`", async (t) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { sample } from "https://deno.land/std@0.210.0/collections/sample.ts"; | ||
import type { Denops } from "https://deno.land/x/denops_core@v6.0.2/mod.ts"; | ||
import { sample } from "jsr:@std/collections@^0.222.1"; | ||
import type { Denops } from "jsr:@denops/core@^6.0.6"; | ||
import type { RunMode } from "./runner.ts"; | ||
import { withDenops } from "./with.ts"; | ||
|
||
|
@@ -45,8 +45,8 @@ export interface TestDefinition extends Omit<Deno.TestDefinition, "fn"> { | |
* tests by passing a `denops` instance to the registered test function. | ||
* | ||
* ```ts | ||
* import { assert, assertFalse } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
* import { test } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
* import { assert, assertFalse } from "jsr:@std/assert"; | ||
* import { test } from "jsr:@denops/test"; | ||
* | ||
* test("vim", "Test with Vim", async (denops) => { | ||
* assertFalse(await denops.call("has", "nvim")); | ||
|
@@ -74,8 +74,8 @@ export function test( | |
* tests by passing a `denops` instance to the registered test function. | ||
* | ||
* ```ts | ||
* import { assert, assertFalse } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
* import { test } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
* import { assert, assertFalse } from "jsr:@std/assert"; | ||
* import { test } from "jsr:@denops/test"; | ||
* | ||
* test({ | ||
* mode: "nvim", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
import { | ||
assert, | ||
assertEquals, | ||
assertFalse, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { assert, assertEquals, assertFalse } from "jsr:@std/assert@^0.222.1"; | ||
import { test } from "./tester.ts"; | ||
|
||
test({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import { deadline } from "https://deno.land/[email protected]/async/mod.ts"; | ||
import { assert, is } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { | ||
Client, | ||
Session, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
import type { | ||
Denops, | ||
Meta, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { deadline } from "jsr:@std/async@^0.222.1"; | ||
import { assert, is } from "jsr:@core/unknownutil@^3.17.3"; | ||
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; | ||
import type { Denops, Meta } from "jsr:@denops/core@^6.0.6"; | ||
import { getConfig } from "./conf.ts"; | ||
import { run, RunMode } from "./runner.ts"; | ||
import { run, type RunMode } from "./runner.ts"; | ||
import { DenopsImpl } from "./denops.ts"; | ||
import { errorDeserializer, errorSerializer } from "./error.ts"; | ||
|
||
|
@@ -44,8 +38,8 @@ export interface WithDenopsOptions { | |
* internally spawns a Vim/Neovim sub-process, which performs the tests. | ||
* | ||
* ```ts | ||
* import { assert, assertFalse } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
* import { withDenops } from "https://deno.land/x/denops_test@$MODULE_VERSION/mod.ts"; | ||
* import { assert, assertFalse } from "jsr:@std/assert"; | ||
* import { withDenops } from "jsr:@denops/test"; | ||
* | ||
* Deno.test("Test Denops (Vim)", async () => { | ||
* await withDenops("vim", async (denops) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import { | ||
assert, | ||
assertFalse, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { assert, assertFalse } from "jsr:@std/assert@^0.222.1"; | ||
import { withDenops } from "./with.ts"; | ||
|
||
Deno.test( | ||
|