Code Monkey home page Code Monkey logo

cljs-react-test's People

Contributors

bensu avatar johncowie avatar kamituel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cljs-react-test's Issues

Errors

Hi, i have installed slimerjs and tried to run your tests but a dependency is missing:
[org.omcljs/om "0.9.0"]
Also when i add the dependency i get this:

$ lein doo slimer test
Building ...
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/clojurescript/0.0-3308/clojurescript-0.0-3308.jar!/cljs/core.cljs
Compiling src/cljs_react_test/simulate.cljs
Compiling src/cljs_react_test/utils.cljs
Analyzing jar:file:/Users/bago/.m2/repository/prismatic/dommy/1.0.0/dommy-1.0.0.jar!/dommy/core.cljs
Analyzing jar:file:/Users/bago/.m2/repository/prismatic/dommy/1.0.0/dommy-1.0.0.jar!/dommy/utils.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/clojurescript/0.0-3308/clojurescript-0.0-3308.jar!/clojure/string.cljs
Compiling test/basic.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/omcljs/om/0.8.8/om-0.8.8.jar!/om/dom.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/clojurescript/0.0-3308/clojurescript-0.0-3308.jar!/cljs/test.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/channels.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/dispatch.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/buffers.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/protocols.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async/impl/timers.cljs
Analyzing jar:file:/Users/bago/.m2/repository/org/omcljs/om/0.8.8/om-0.8.8.jar!/om/core.cljs
Compiling test/test_runner.cljs
Analyzing jar:file:/Users/bago/.m2/repository/doo/doo/0.1.2-SNAPSHOT/doo-0.1.2-SNAPSHOT.jar!/doo/runner.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/test.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/clojure/string.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/om/dom.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/dommy/core.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/dommy/utils.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/doo/runner.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/om/core.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/timers.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/ioc_helpers.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/protocols.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/buffers.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/dispatch.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core/async/impl/channels.cljs
Compiling /Users/bago/Documents/code/cljs-react-test/target/cljsbuild-compiler-0/cljs/core.cljs
Applying optimizations :whitespace
Jul 14, 2015 6:30:47 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Duplicate extern input: file:/Users/bago/.m2/repository/cljsjs/react/0.12.2-5/react-0.12.2-5.jar!/cljsjs/common/react.ext.js

Jul 14, 2015 6:30:47 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: file:/Users/bago/.m2/repository/cljsjs/react/0.12.2-5/react-0.12.2-5.jar!/cljsjs/common/react.ext.js at (unknown source) line (unknown line) : (unknown column)
... done. Elapsed 16.583571467 seconds

Watching paths: /Users/bago/Documents/code/cljs-react-test/src, /Users/bago/Documents/code/cljs-react-test/test

Duplicated external input: react.ext.js, any thought?
Thank you and great work!

TypeError: undefined is not an object (evaluating 'React.addons.TestUtils')

I am having some difficulty updating to the latest versions. I created a example project that demonstrates the issue.

Tests run as desired when using

[cljsjs/react-with-addons        "0.13.3-0"]
[cljs-react-test                 "0.1.3-SNAPSHOT"]

After updating dependencies to and making no other changes

[cljs-react-test                 "0.1.4-SNAPSHOT"]
[cljsjs/react-with-addons        "15.2.0-0"]
[cljsjs/react-dom                "15.2.0-0" :exclusions [cljsjs/react]]
[prismatic/dommy                 "1.1.0"]

The following error occurs

;; ======================================================================
;; Testing with Phantom:

TypeError: undefined is not an object (evaluating 'React.addons.TestUtils')

  phantomjs://code/phantom966794781240370468.js:81 in onError

Am I overlooking something?

Trying to select (w/ Dommy) nested :option

Hi there, I am trying to utilize cljs-react-test and dommy to change a dropdown menu choice which in turns updates the atom. However, it seems I am not doing this correctly. Here is what I have for code and my tests.

------ Component --------- in (ns. component.dropdown)
(defn dropdown [] [:div [:select {:on-change #(swap! app-state assoc :bind (.. % -target -value))} [:option {:value "1"} "1"] [:option {:value "2"} "2"] [:option {:value "3"} "3"] [:option {:value "4"} "4"]]])

------In Test file ------------
`(def ^:dynamic c)

(use-fixtures :each (fn [test-fn]
(binding [c (tu/new-container!)]
(test-fn)
(tu/unmount! c))))

(deftest dropdown-selection-appstate-on-change
(let [_ (reagent/render [cd/dropdown app-state] c)
node (sel1 c [:select])
dropdown-selection (:bind @App-State)]
(is (= "0" (:bind @App-State)))
(sim/change node {:target {:option {:value "3"}}})
(is (= "3" (:bind @App-State)))))`

----------Test read out-----------
FAIL in (dropdown-selection-appstate-on-change) (:)
expected: (= "3" (:bind (clojure.core/deref app-state)))
actual: (not (= "3" nil))

java.lang.Exception: No namespace: camel-snake-kebab.core

Every now and then I get the following error, nondeterministically:

java.lang.Exception: No namespace: camel-snake-kebab.core, compiling:(cljs_react_test/simulate.clj:1:1)

Perhaps something could be required in a better way? Otherwise what could it be going on?

Cheers - Victor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.