emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs 1e4d6cd8b7 340/472: UT for terrified-ghost functio


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 1e4d6cd8b7 340/472: UT for terrified-ghost function (#171)
Date: Thu, 6 Jan 2022 21:59:37 -0500 (EST)

branch: elpa/pacmacs
commit 1e4d6cd8b7cb885cacfb2e318db2992426031428
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    UT for terrified-ghost function (#171)
---
 test/pacmacs-test.el | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/test/pacmacs-test.el b/test/pacmacs-test.el
index 78a5a2f81b..dd40d74ca8 100644
--- a/test/pacmacs-test.el
+++ b/test/pacmacs-test.el
@@ -65,3 +65,21 @@
      (mock (pacmacs--load-current-level) => nil)
      (pacmacs--load-next-level)
      (should (= 0 pacmacs-current-level)))))
+
+(ert-deftest pacmacs--terrify-ghost-test ()
+  (let* ((pacmacs--ghost-terrified-time-ms 60065)
+         (ghost (list :property-1 1
+                      :property-2 2
+                      :current-animation 'ghost-animation
+                      :switch-direction-callback 'ghost-direction-switcher
+                      :type 'ghost))
+         (terrified-ghost (list :property-1 1
+                                :property-2 2
+                                :current-animation 'terrified-ghost-animation
+                                :switch-direction-callback 
'pacmacs--switch-direction-callback
+                                :type 'terrified-ghost
+                                :terrified-timer 
pacmacs--ghost-terrified-time-ms)))
+    (with-mock
+     (mock (pacmacs-load-anim "Terrified-Ghost") => 'terrified-ghost-animation)
+     (should (equal terrified-ghost
+                    (pacmacs--terrify-ghost ghost))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]