Skip to content

Commit

Permalink
chore: add new context validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
armed committed Jun 9, 2022
1 parent b790007 commit 667e7c2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/k16/gx/beta/core_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,18 @@
(fn [_]
(is (= [:server :db :logger] @flow))
(done))))))])))

(deftest validate-context-test
(let [context {:initial-state :uninitialised
:normalize {:auto-signal :gx/start
:props-signals #{:gx/start}}
:signal-mapping {}
:signals {:gx/start {:from-states #{:stopped :uninitialised}
:to-state :started
:deps-from :gx/stop}
:gx/stop {:from-states #{:started}
:to-state :stopped
:deps-from :gx/start}}}]
(testing "should check for circular deps-from"
(is (= "circular :gx/start -> :gx/stop -> :gx/start"
(first (gx/validate-context context)))))))

1 comment on commit 667e7c2

@vercel
Copy link

@vercel vercel bot commented on 667e7c2 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gx – ./

gx-git-master-kepler16.vercel.app
gx-kepler16.vercel.app
gx.kepler16.com

Please sign in to comment.