Last active
June 10, 2016 13:27
-
-
Save swannodette/c1444684bc2a8236634e4e110c654fe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns om.next.spec | |
(:require [cljs.spec :as s] | |
[clojure.test.check :as tc] | |
[clojure.test.check.properties :as tcp])) | |
(s/def ::statics | |
(s/cat | |
:static '#{static} | |
:protocol-name '#{om.next/Ident om.next/IQuery om.next/IQueryParams} | |
:impls (s/* seq?))) | |
(s/def ::protocols | |
(s/cat | |
:protocol-name (s/& symbol? #(not= 'static %)) | |
:impls (s/* seq?))) | |
(s/def ::methods | |
(s/alt :statics ::statics | |
:protocols ::protocols)) | |
(s/def ::defui | |
(s/cat :defui '#{defui} | |
:name symbol? | |
:impls (s/* ::methods))) | |
(s/explain ::defui | |
'(defui Foo | |
static om.next/Ient | |
(ident [this props]) | |
Object | |
(render [this] | |
) | |
(shouldComponentUpdate [this next-props next-state]))) | |
;; In: [3] val: om.next/Ient fails at: [:impls :statics :protocol-name] predicate: (quote #{Ident IQueryParams IQuery}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment