Commit Graph

48 Commits

Author SHA1 Message Date
Julien Fantin b7be7864a4 Add jvm interop handlers for dispose! and add-on-dispose! 2017-09-14 10:24:19 +12:00
Stuart Mitchell 13549b5b13 Changed test filepath 2017-08-22 10:34:34 +12:00
Mike Thompson 2aed40e8b9 Fix broken test 2017-07-23 13:09:09 +10:00
Erik Sandberg 50dea3bd67 Added test for no effect db in on-changes 2017-05-18 13:55:58 -07:00
Nicolas Berger fa7828375a Fix update-coeffect
Similar to assoc-coeffect, update-coeffect has to do an update-in
`[:coeffects key]`
2017-03-25 07:47:53 -07:00
Daniel Compton 2210d6f129 Fix dynamic subscriptions
Fixes #296.
Thanks to @martinklepsch for #297.
2016-12-20 08:57:29 +13:00
Daniel Compton bd18563f5d Tweak trim-v patch
- Add another test assertion
- Add changelog
- Tweak style of std interceptor to use dissoc-in
2016-12-12 15:40:59 +13:00
Oliver Hine ff7c175de0 making trim-v before/after symmetrical 2016-12-12 15:39:29 +13:00
Daniel Compton 52396f7518 Provide enrich interceptor with db coeffect
If no db effect was produced.

Fixes #278
2016-12-08 22:29:13 +13:00
Daniel Compton 5318a29ace Dispose of subscriptions that were created after restore fn
Fixes #223
2016-12-07 16:57:06 +13:00
Daniel Compton 20e52058d7 Disable trace tests
We need to move Karma testing to optimizations :none, as goog-define
doesn't work for optimizations :whitespace.
2016-11-28 22:34:17 +13:00
Daniel Compton 50e87fd5a6 Trace re-frame event lifecycle
Trace subs, FSM, events
Add tests for basic behaviour
2016-11-24 18:14:48 +13:00
Daniel Compton ff164beb8f Don't throw when subscribing to a non-existent sub
Fixes bug where we were logging if a sub didn't exist, but then trying
to create it still.
2016-11-24 17:57:41 +13:00
Daniel Compton 9839b258cb
Don't create subscriptions in reg-sub
This commit fixes a bug where reg-sub created subscriptions and closed
over them when using the `:<- [:sub]` sugar. Now dependent subscriptions
aren't created until they are needed, and they will be cleaned up
correctly.
2016-10-21 09:56:20 +13:00
Daniel Compton f1337bcb6b Modify test to check for missing fx handler 2016-10-17 10:31:00 +13:00
krishnaprasad e3c4da6249 test logging of missing effect handlers 2016-10-15 06:10:34 +05:30
Daniel Compton 5486d2058f Call after interceptor with db coeffect, if no db effect is produced
after interceptors expect to always get a db value. If no db effect is
produced, then they may fail (for example schema validation on db if
no db is provided).

Fixes #239
2016-10-13 10:44:40 +13:00
Mike Thompson b0c0aa54ab Move low level handler registration for subs. 2016-08-27 23:18:40 +10:00
hipitihop 733ad218a2 Update fx-test fixtures to use re-frame.core/make-restore-fn & update docs 2016-08-24 10:44:21 +10:00
hipitihop cdf26ca3d0 test-runner - remove explicit devtools dep and init now done via :preloads 2016-08-24 10:41:45 +10:00
Mike Thompson 8c797e33f2 Reduce test boilerplate by combining two tests. 2016-08-09 00:10:19 +10:00
Mike Thompson 5c17176f8d Add a test to cover the newly discovered nil case 2016-08-09 00:01:15 +10:00
Mike Thompson 656f586ece reformat 2016-08-08 23:17:00 +10:00
Mike Thompson 6a172ddbe0 Fix bug identified by @samroberton https://github.com/Day8/re-frame/pull/189 2016-08-08 23:10:41 +10:00
Mike Thompson c8659d6770 Version 0.8.0-alpha10 2016-08-08 15:30:38 +10:00
Mike Thompson 4ade89c74e rework implementation of subscriptions 2016-08-04 17:08:08 +10:00
Mike Thompson 311367dc3d Change to Interceptors (away from middleware). This is a big code drop.
Tests pass and todomvc works.
But there is some ugliness to now resolve, and a couple of  unresolved issues.
2016-08-03 12:53:01 +10:00
hipitihop e884dcadb6 Simplify :dispatch-later and only support single :dispatch 2016-07-27 16:03:29 +10:00
hipitihop 12f6eeee3c Change :dispatch-later fx handler now expects vector of {:ms ... :dispatch ...} & add unit test 2016-07-27 15:43:47 +10:00
Mike Thompson 658f3b0232 Switch to using `reg-*` naming, instead of `def-*` naming 2016-07-24 17:08:09 +10:00
Stuart Mitchell faae34822c Removed undo functionality as it is not handled in day8.re-frame/undo 2016-07-22 14:02:18 +12:00
Stuart Mitchell 19ede7bac5 Adds informational stack traces to errors in dispatch 2016-07-19 16:46:33 +12:00
hipitihop a1314eb6c3 Add cljs-test to test-runner via browser/html
- standardised test namespaces: renamed to use -test suffix and moved to eliminate redundant /test folder
- added cljs-test based tests via browser/html. These mimic original karma tests.
   NOTE: previous lein aliases `once` and `auto` have been replaced by `test-once` , `test-auto` & `karma-once`
- update karma.conf & circle.yml
- updated CHANGES.md & CONTRIBUTING.md
2016-07-14 11:21:12 +10:00
Mike Thompson 5572e6ebf1 Checkpoint. Further Miscellaneous work towards Effectual Handlers 2016-07-13 16:28:15 +10:00
Mike Thompson 0b2bcbe65e Complete undo/redo work 2016-06-23 23:41:20 +10:00
Stuart Mitchell f4fb65037e Subscriptions sugar - changed to provide a singleton 2016-06-22 15:41:22 +12:00
Mike Thompson 9452998e0b WIP. undo test fails. 2016-06-22 10:54:41 +10:00
Stuart Mitchell be6fab2c92 added tests for cached subsciptions 2016-06-14 16:10:44 +12:00
Stuart Mitchell 5a4d78ecc8 register-pure-sub: moved into correct namespace 2016-06-14 14:52:37 +12:00
Stuart Mitchell 48a1bda438 register-pure-sub: uses a function to do the work 2016-06-14 14:52:25 +12:00
Stuart Mitchell a5f73a3991 Added tests for existing subscriptions 2016-06-14 14:50:40 +12:00
Daniel Compton 41cf9951d8 Add tests for undo behaviour
Inspired by #149, this adds tests to cover the change that was made. It
also tests the redo logic.
2016-01-28 23:14:43 +13:00
Daniel Compton 3334297f23 Switch to using CircleCI and automated testing with Karma
- Remove travis config
- Add CircleCI config and badge
- Add docs on running the tests
- Create a test runner
- Add npm dependencies and gitignore
2015-12-10 21:47:18 +13:00
Krisztian Szabo 44e0b7383c Remove unnecessary whitespace from tests 2015-07-24 16:39:04 +02:00
mike-thompson-day8 3cf565c8d4 whitespace 2015-04-25 09:42:04 +10:00
mike-thompson-day8 903cd76cc3 Fix test 2015-04-25 09:37:22 +10:00
mike-thompson-day8 c2a9a041eb Add tests for new "on-changes" middleware 2015-04-25 09:31:03 +10:00
Stuart Mitchell f62bb1a324 first run of travis and tests 2015-03-04 17:12:54 +13:00