processes a form or a check (defn view-signal [op] (let [output (atom nil)] (event/with-temp-listener [:test (fn [{:keys [result]}] (reset! output (into {} result)))] (process op) @output)))
(view-signal (common/op {:type :form :form '(+ 1 2 3) :meta {:line 10 :col 3}})) => (contains {:status :success, :data 6, :form '(+ 1 2 3), :from :evaluate, :meta {:line 10, :col 3}})
((contains {:status :success, :data true, :checker common/checker? :actual 6, :from :verify, :meta nil}) (view-signal (common/op {:type :test-equal :input {:form '(+ 1 2 3)} :output {:form 'even?}}))) => true
processes a form or a check (defn view-signal [op] (let [output (atom nil)] (event/with-temp-listener [:test (fn [{:keys [result]}] (reset! output (into {} result)))] (process op) @output))) (view-signal (common/op {:type :form :form '(+ 1 2 3) :meta {:line 10 :col 3}})) => (contains {:status :success, :data 6, :form '(+ 1 2 3), :from :evaluate, :meta {:line 10, :col 3}}) ((contains {:status :success, :data true, :checker common/checker? :actual 6, :from :verify, :meta nil}) (view-signal (common/op {:type :test-equal :input {:form '(+ 1 2 3)} :output {:form 'even?}}))) => true
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close