This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-18
Channels
- # admin-announcements (4)
- # announcements (1)
- # boot (9)
- # cider (19)
- # clojure (59)
- # clojure-android (59)
- # clojure-berlin (2)
- # clojure-dev (13)
- # clojure-japan (11)
- # clojure-russia (112)
- # clojure-spain (2)
- # clojure-uk (2)
- # clojurescript (183)
- # core-typed (9)
- # cursive (4)
- # datomic (9)
- # indycljs (2)
- # jobs (3)
- # ldnclj (3)
- # off-topic (4)
- # re-frame (4)
- # reagent (13)
Does anyone have an example of a tested reagent application that uses localStorage? PhantomJS doesn't seem to play nicely with localStorage in the reagent -template. I have unsuccessfully attempted to use slimerjs as a phantom alternative, but I must be missing something trying to wire it up.
Not sure how you are doing local storage, but I recommend using https://github.com/alandipert/storage-atom
I am indeed using storage-atom. Works great in the app, I just can't manage to get tests to run when using it (or accessing localStorage directly)
Where is the todomvc example located? If that is tested perhaps that could point me in the right direction to see if I am just doing something improperly.
However, that was passing Mocha tests I believe. I didn't include any clojurescript tests..
Ahh yeah I was hoping to use clojurescript.test
Ive only used cljs.test and speclj before. I tried using clojurescript.test once and didnt set it up correctly with reagent. I should probably try again! Is there a repo you can point me to that has a working example with reagent?
The reagent-tempate actually comes setup with a working test if you create it with +test just do a lein new reagent <name> +test
I have had success writing tests for quite a few things, once the localStorage is added to the mix however a little tweaking is still required.