File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 4
4
[cljs.js :as cljs]
5
5
[cljs.nodejs :as nodejs]))
6
6
7
+ (set! (.-user js/cljs) #js {})
8
+
7
9
(nodejs/enable-util-print! )
8
10
9
11
(defn latch [m f]
21
23
(def st (cljs/empty-state ))
22
24
23
25
(defn node-eval [{:keys [name source]}]
24
- (.runInThisContext vm source (str (munge name) " .js" )))
26
+ (if-not js/COMPILED
27
+ (.runInThisContext vm source (str (munge name) " .js" ))
28
+ (js/eval source)))
25
29
26
30
(def libs
27
31
{'bootstrap-test.core :cljs
31
35
(defn node-load [{:keys [name macros]} cb]
32
36
(if (contains? libs name)
33
37
(let [path (str " src/test/cljs/" (cljs/ns->relpath name)
34
- " ." (cljs.core/name (get libs name)))]
38
+ " ." (cljs.core/name (get libs name)))]
35
39
(.readFile fs path " utf-8"
36
40
(fn [err src]
37
41
(cb (if-not err
72
76
(is (nil? error))
73
77
(is (== value 2 ))
74
78
(inc! l)))
75
- #_ (cljs/eval-str st " (def x 1)" nil
79
+ (cljs/eval-str st " (def x 1)" nil
76
80
{:eval node-eval
77
81
:context :expr
78
82
:def-emits-var true }
You can’t perform that action at this time.
0 commit comments