aboutsummaryrefslogtreecommitdiff
path: root/specs
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-12-27 17:54:31 +0530
committerAkshay Nair <phenax5@gmail.com>2024-12-27 17:54:31 +0530
commit98af698a806e41904368c0114f9d8d9f377d9c09 (patch)
treeb09e835b1cf4c678fe557b1ab01905e75ee3922f /specs
parent3d461b234d0b30cb7085251390b264089f447a97 (diff)
downloadchelleport-98af698a806e41904368c0114f9d8d9f377d9c09.tar.gz
chelleport-98af698a806e41904368c0114f9d8d9f377d9c09.zip
Minor refactor
Diffstat (limited to 'specs')
-rw-r--r--specs/Specs/AppStateSpec.hs4
-rw-r--r--specs/Specs/KeySequenceSpec.hs4
2 files changed, 4 insertions, 4 deletions
diff --git a/specs/Specs/AppStateSpec.hs b/specs/Specs/AppStateSpec.hs
index 2508021..de9d552 100644
--- a/specs/Specs/AppStateSpec.hs
+++ b/specs/Specs/AppStateSpec.hs
@@ -64,7 +64,7 @@ test = do
-- let currentState = defaultState
it "todo: implement" $ do
- 1 `shouldBe` 1
+ True `shouldBe` True
context "with action IncrementMouseCursor" $ do
context "when repetition is 1" $ do
@@ -137,7 +137,7 @@ test = do
context "with action HandleKeyInput" $ do
context "when mode is ModeSearch" $ do
it "todo: implement" $ do
- 1 `shouldBe` 1
+ True `shouldBe` True
context "when mode is ModeHints" $ do
context "when there are no matches" $ do
diff --git a/specs/Specs/KeySequenceSpec.hs b/specs/Specs/KeySequenceSpec.hs
index 7a92105..3811fbe 100644
--- a/specs/Specs/KeySequenceSpec.hs
+++ b/specs/Specs/KeySequenceSpec.hs
@@ -26,12 +26,12 @@ test = do
describe "#generateGrid" $ do
it "generates grid of key sequences" $ do
generateGrid 0 (4, 4) "ABCDEF"
- `shouldBe` Just [["AE", "BD", "CC", "BB"], ["AC", "FD", "EE", "EC"], ["FB", "EA", "DF", "DD"], ["CA", "DB", "CE", "BF"]]
+ `shouldBe` Right [["AE", "BD", "CC", "BB"], ["AC", "FD", "EE", "EC"], ["FB", "EA", "DF", "DD"], ["CA", "DB", "CE", "BF"]]
context "when the the keys set is too short" $ do
it "cycles back to first character" $ do
generateGrid 0 (4, 4) "AB"
- `shouldBe` Nothing
+ `shouldBe` Left "Row/Column counts too high"
describe "#findMatchPosition" $ do
it "returns the position of the matching key sequence" $ do