Add tests for last function I use
Some checks failed
/ Test on 28.2 (push) Failing after 3m14s
/ Test on 29.1 (push) Successful in 3m34s
/ Test on snapshot (push) Failing after 6m23s

This commit is contained in:
Maciej 2024-08-19 20:14:27 +03:00
parent 859d748069
commit fdf4c9da84
Signed by: maciej
GPG key ID: 41D62D42D3B0D765

View file

@ -40,4 +40,19 @@
(file-missing
(error-message-string err))))
:to-equal "Setting current directory: No such file or directory, /usr/fake-project")))
(describe "counsel-projectile-find-file"
(before-each
(spy-on 'ivy-read)
(spy-on 'projectile-project-root :and-return-value user-emacs-directory))
(it "finds a file"
(counsel-projectile-find-file)
(expect 'ivy-read :to-have-been-called-with
"[29.1] Find file: " nil
:matcher 'counsel-projectile--find-file-matcher
:require-match t
:sort nil
:action counsel-projectile-find-file-action
:caller 'counsel-projectile-find-file)))
;;; test-counsel-projectile.el ends here