feat: add SSE connect/disconnect public API
This commit is contained in:
@@ -95,5 +95,20 @@
|
||||
(should (string-match-p "/api/v1/events" url))
|
||||
(should-not (string-match-p "account=" url)))))
|
||||
|
||||
(ert-deftest noise-sse-connect-is-interactive ()
|
||||
"noise-sse-connect is an interactive command."
|
||||
(should (commandp 'noise-sse-connect)))
|
||||
|
||||
(ert-deftest noise-sse-disconnect-is-interactive ()
|
||||
"noise-sse-disconnect is an interactive command."
|
||||
(should (commandp 'noise-sse-disconnect)))
|
||||
|
||||
(ert-deftest noise-sse-disconnect-cleans-up ()
|
||||
"noise-sse-disconnect cleans up process and timer."
|
||||
(let ((noise-sse--reconnect-timer (run-with-timer 1000 nil #'ignore)))
|
||||
(noise-sse-disconnect)
|
||||
(should (null noise-sse--process))
|
||||
(should (null noise-sse--reconnect-timer))))
|
||||
|
||||
(provide 'noise-sse-test)
|
||||
;;; noise-sse-test.el ends here
|
||||
|
||||
Reference in New Issue
Block a user