aboutsummaryrefslogtreecommitdiff
path: root/specs
diff options
context:
space:
mode:
Diffstat (limited to 'specs')
-rw-r--r--specs/Specs/KeySequenceSpec.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/specs/Specs/KeySequenceSpec.hs b/specs/Specs/KeySequenceSpec.hs
index d094741..707646d 100644
--- a/specs/Specs/KeySequenceSpec.hs
+++ b/specs/Specs/KeySequenceSpec.hs
@@ -5,13 +5,14 @@ import Test.Hspec
test = do
describe "#nextChars" $ do
- it "filters key sequence and returns next characters" $ do
- nextChars "AB" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]]
- `shouldBe` Just "CD"
- nextChars "A" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]]
- `shouldBe` Just "BM"
+ context "when there is a partial match" $ do
+ it "filters key sequence and returns next characters" $ do
+ nextChars "AB" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]]
+ `shouldBe` Just "CD"
+ nextChars "A" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]]
+ `shouldBe` Just "BM"
- context "when exact match is present" $ do
+ context "when there is an exact match" $ do
it "returns next characters" $ do
nextChars "ABD" [["XYZ", "ABC"], ["AMK", "BBL", "ABD"]]
`shouldBe` Just ""