File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/test/clojure/cljs/analyzer Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7
7
; ; You must not remove this notice, or any other, from this software.
8
8
9
9
(ns cljs.analyzer.spec-tests
10
- (:require [cljs.analyzer-tests :refer [analyze ns-env]]
10
+ (:require [cljs.analyzer.api :as ana :refer [no-warn]]
11
+ [cljs.analyzer-tests :refer [analyze ns-env]]
11
12
[cljs.analyzer.specs :as a]
12
13
[clojure.test :as test :refer [deftest is]]
13
14
[clojure.spec.alpha :as s]))
26
27
(is (s/valid? ::a/node (analyze ns-env '(let [x 1 ]))))
27
28
(is (s/valid? ::a/node (analyze ns-env '(let [x 1 ] x)))))
28
29
30
+ (deftest test-new
31
+ (is (s/valid? ::a/node (no-warn (analyze ns-env '(new String)))))
32
+ (is (s/valid? ::a/node (no-warn (analyze ns-env '(new js/String)))))
33
+ (is (s/valid? ::a/node (no-warn (analyze ns-env '(String.)))))
34
+ (is (s/valid? ::a/node (no-warn (analyze ns-env '(js/String.))))))
35
+
29
36
(comment
30
37
31
38
(test/run-tests )
You can’t perform that action at this time.
0 commit comments