diff options
| author | theprimeagain <the.primeagen@gmail.com> | 2026-02-07 13:18:42 -0700 |
|---|---|---|
| committer | theprimeagain <the.primeagen@gmail.com> | 2026-02-07 13:18:42 -0700 |
| commit | 4c110b5f8131339d910e47118c81813fd799eec2 (patch) | |
| tree | cb07cb62ecaf2715c86b591ba559f9757efd59aa /lua/99/test | |
| parent | 9b8438bd3f1245c6b5818eb53fab0424ba5f1b23 (diff) | |
| download | a4-4c110b5f8131339d910e47118c81813fd799eec2.tar.xz a4-4c110b5f8131339d910e47118c81813fd799eec2.zip | |
the beginnings of semantic search
Diffstat (limited to 'lua/99/test')
| -rw-r--r-- | lua/99/test/request_status_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lua/99/test/request_status_spec.lua b/lua/99/test/request_status_spec.lua index c1126c8..4009cf9 100644 --- a/lua/99/test/request_status_spec.lua +++ b/lua/99/test/request_status_spec.lua @@ -24,4 +24,26 @@ describe("request_status", function() eq({ "⠙ TITLE", "bar", "baz" }, status:get()) end) + it("using callback function", function() + local calls = {} + local status = RequestStatus.new(100, 3, "TITLE", function(status_lines) + table.insert(calls, status_lines) + end) + status:start() + + vim.wait(200, function() + return #calls == 1 + end) + eq(1, #calls) + eq({ "⠹ TITLE", }, calls[1]) + calls = {} + + status:push("bar") + + vim.wait(200, function() + return #calls == 1 + end) + eq(1, #calls) + eq({ "⠸ TITLE", "bar" }, calls[1]) + end) end) |
