Fork me on GitHub

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


I used that for the reagent todomvc and it passed their suite of tests


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)


Ah dang, then I'm not sure what the problem is


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.


Oh nice, yeah I'll try that. I tried a couple months ago, and I must've caught it when it was momentarily out of sync bc it wouldn't compile with that profile added.