Skip to content

Commit 8a54da8

Browse files
committed
🌿 fix flaky test
1 parent 116dc1c commit 8a54da8

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/denops/runtime/functions/denops/request_async_test.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,14 @@ testHost({
122122
await t.step("returns immediately", async () => {
123123
await host.call("execute", [
124124
"let g:__test_denops_events = []",
125+
"call denops#request_async('dummy', 'not_exist_method', ['foo'], 'TestDenopsRequestAsyncSuccess', 'TestDenopsRequestAsyncFailure')",
126+
"let g:__test_denops_events_after_called = g:__test_denops_events->copy()",
125127
], "");
126128

127-
await host.call(
128-
"denops#request_async",
129-
"dummy",
130-
"not_exist_method",
131-
["foo"],
132-
"TestDenopsRequestAsyncSuccess",
133-
"TestDenopsRequestAsyncFailure",
129+
assertEquals(
130+
await host.call("eval", "g:__test_denops_events_after_called"),
131+
[],
134132
);
135-
136-
assertEquals(await host.call("eval", "g:__test_denops_events"), []);
137133
});
138134

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

0 commit comments

Comments
 (0)