Skip to content

Commit

Permalink
WIP: plugin test
Browse files Browse the repository at this point in the history
  • Loading branch information
Milly committed Jul 10, 2024
1 parent dd49331 commit 72514f6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/denops/runtime/functions/plugin_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1786,8 +1786,6 @@ testHost({

// NOTE: This test stops the denops server.
await t.step("denops#plugin#wait()", async (t) => {
const WAIT_TEST_ERROR_RANGE = 0.5; // sec

await t.step("if the plugin is loading", async (t) => {
await host.call("execute", [
"let g:__test_denops_events = []",
Expand All @@ -1803,7 +1801,7 @@ testHost({
"g:__test_denops_wait_elapsed",
) as number;
assertGreater(elapsed_sec, 1.0);
assertLess(elapsed_sec, 1.0 + WAIT_TEST_ERROR_RANGE);
assertLess(elapsed_sec, 5.0);
});

await t.step("returns 0", async () => {
Expand Down Expand Up @@ -1881,7 +1879,7 @@ testHost({
"g:__test_denops_wait_elapsed",
) as number;
assertGreater(elapsed_sec, 1.0);
assertLess(elapsed_sec, 1.0 + WAIT_TEST_ERROR_RANGE);
assertLess(elapsed_sec, 5.0);
});

await t.step("returns 0", async () => {
Expand Down Expand Up @@ -1958,7 +1956,7 @@ testHost({
"g:__test_denops_wait_elapsed",
) as number;
assertGreater(elapsed_sec, 1.0);
assertLess(elapsed_sec, 1.0 + WAIT_TEST_ERROR_RANGE);
assertLess(elapsed_sec, 5.0);
});

await t.step("returns -3", async () => {
Expand Down Expand Up @@ -2028,7 +2026,7 @@ testHost({
"g:__test_denops_wait_elapsed",
) as number;
assertGreater(elapsed_sec, 1.0);
assertLess(elapsed_sec, 1.0 + WAIT_TEST_ERROR_RANGE);
assertLess(elapsed_sec, 5.0);
});

await t.step("returns -1", async () => {
Expand Down Expand Up @@ -2062,7 +2060,7 @@ testHost({
"g:__test_denops_wait_elapsed",
) as number;
assertGreater(elapsed_sec, 1.0);
assertLess(elapsed_sec, 1.0 + WAIT_TEST_ERROR_RANGE);
assertLess(elapsed_sec, 5.0);
});

await t.step("returns -1", async () => {
Expand Down

0 comments on commit 72514f6

Please sign in to comment.