Skip to content

Commit

Permalink
🌿 fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Milly committed Sep 18, 2024
1 parent 116dc1c commit 8a54da8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/denops/runtime/functions/denops/request_async_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,14 @@ testHost({
await t.step("returns immediately", async () => {
await host.call("execute", [
"let g:__test_denops_events = []",
"call denops#request_async('dummy', 'not_exist_method', ['foo'], 'TestDenopsRequestAsyncSuccess', 'TestDenopsRequestAsyncFailure')",
"let g:__test_denops_events_after_called = g:__test_denops_events->copy()",
], "");

await host.call(
"denops#request_async",
"dummy",
"not_exist_method",
["foo"],
"TestDenopsRequestAsyncSuccess",
"TestDenopsRequestAsyncFailure",
assertEquals(
await host.call("eval", "g:__test_denops_events_after_called"),
[],
);

assertEquals(await host.call("eval", "g:__test_denops_events"), []);
});

await t.step("calls failure callback", async () => {
Expand Down

0 comments on commit 8a54da8

Please sign in to comment.