Skip to content

Commit

Permalink
* :js-object :keys are _not_ nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Nov 20, 2024
1 parent 7bf09f0 commit eb1b4a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/clojure/cljs/analyzer/spec_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
(is (= :js-array (:op node)))
(is (s/valid? ::a/node node))))

#_(deftest test-js-object
(deftest test-js-object
(let [node (analyze ns-env
(ana-api/with-state (ana-api/empty-state)
(first (ana-api/forms-seq (StringReader. "#js {:foo 1 :bar 2}")))))]
Expand Down
3 changes: 1 addition & 2 deletions src/test/clojure/cljs/analyzer/specs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
(defmethod node :js-object [_]
(s/merge ::base
(s/keys
:req-un [::keys ::vals])))
:req-un [::vals])))

(s/def ::ns symbol?)

Expand Down Expand Up @@ -205,7 +205,6 @@
(s/keys
:req-un [::bindings ::body])))

(s/def ::keys (s/* ::node))
(s/def ::vals (s/* ::node))

(defmethod node :map [_]
Expand Down

0 comments on commit eb1b4a6

Please sign in to comment.