Skip to content

Commit

Permalink
Started the client module tests, got too much to do today so will hop…
Browse files Browse the repository at this point in the history
…efully come back to it in a sec
Olical committed Aug 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent dcfd2b3 commit 783cce3
Showing 2 changed files with 69 additions and 0 deletions.
33 changes: 33 additions & 0 deletions fnl/conjure-spec/client_spec.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(local {: describe : it : before-each } (require :plenary.busted))
(local assert (require :luassert.assert))
(local client (require :conjure.client))

(describe "multiple-states? before a change"
(fn []
(it "returns false before the first change"
(fn []
(assert.is_false (client.multiple-states?))))))

(describe "state-key"
(fn []
(it "can be executed to get the current state key"
(fn []
(assert.equal :default (client.state-key))))))

(describe "set-state-key!"
(fn []
(it "changes the state key value"
(fn []
(client.set-state-key! :new-key)
(assert.equal :new-key (client.state-key))))))

(describe "multiple-states? after a change"
(fn []
(it "returns true after the first change"
(fn []
(assert.is_true (client.multiple-states?))))))

;; TODO Carry on with this file!
; (describe "new-state"
; (fn []
; ))
36 changes: 36 additions & 0 deletions lua/conjure-spec/client_spec.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 783cce3

Please sign in to comment.