Commit Graph

164 Commits

Author SHA1 Message Date
Juho Teperi 7d074b55ed Remove test divs from dom after error 2017-10-13 19:21:44 +03:00
Juho Teperi 39b0326d22 Add componentDidCatch support and test (error boundary) 2017-10-13 19:20:36 +03:00
Juho Teperi b81af9308a Fix doo & test result component on demo app 2017-10-13 16:00:04 +03:00
Juho Teperi 4bfed50f33 Fix and note about property case test 2017-10-13 11:18:48 +03:00
Juho Teperi be45ec0aa7 Better style prop test 2017-10-13 11:18:32 +03:00
Juho Teperi ef5c98eeba In Node & CJS React, style prop doesn't end in ; 2017-10-12 16:29:15 +03:00
Juho Teperi 47e386d49d Fix text case on some tests 2017-10-12 16:15:12 +03:00
Juho Teperi 6dc26c9cf0 React validates aria properties, if using Node module 2017-10-12 16:14:46 +03:00
Juho Teperi 3d061329d8 Remove duplicate test-results var 2017-10-12 15:38:32 +03:00
Fredrik Roman 5463bd8403 Add IWithMeta protocol to RAtom 2017-10-05 20:55:29 -04:00
Juho Teperi 4f69a37fcc Fix tests on Chrome, don't load demo app on test runner 2017-09-29 11:02:34 +03:00
Juho Teperi fd93b09c96 Rework test runner and prerendering
Use doo for tests.
2017-09-29 01:34:06 +03:00
Juho Teperi d83a1e319c Clean JS requires 2017-07-29 16:26:28 +03:00
Juho Teperi 84bfd13052 Update to use JS requires 2017-07-09 23:11:49 +03:00
Juho Teperi dfb5d91b09 Merge branch 'master' into npm-deps 2017-07-09 15:46:15 +03:00
Juho Teperi 3cf045dc82 Fix partial-ifn with latest Cljs
Old implementation incorrectly used variadic arity for -invoke
implementation. Variadic artities for protocols are not supported by
Cljs. The old code as worked by luck but was broken by a recent change:
https://dev.clojure.org/jira/browse/CLJS-2099

New implementation properly implements all the artities for -invoke. New
implementation creates the partial fn in a constructor function, so -invoke
code doesn't need to do that. New implementation also implements Fn.
2017-06-27 15:16:10 +03:00
Juho Teperi 9d2991ed32 Test with npm deps 2017-06-06 18:33:23 +03:00
Juho Teperi 18cb1468a6 Update to React 15.5, use create-react-class
Fixes #292
2017-05-19 19:30:38 +03:00
Juho Teperi 4ea070d15a Add test to validate that style properties with dashes work 2017-03-11 01:56:39 +02:00
Juho Teperi b973a873fc Merge branch 'revert-128' of https://github.com/moskvax/reagent into moskvax-revert-128 2017-03-11 01:44:23 +02:00
Juho Teperi 19ae267b32 Fix CI tests
Gen-site.js is used both to pre-render HTML files and run tests.
2017-03-11 00:58:14 +02:00
Juho Teperi 8630ab5239 Fix #278: Replace mentions of render-component with render 2017-03-10 17:19:19 +02:00
Juho Teperi 560f99174a Fix dom-server calls in demo and text code 2016-11-17 02:58:44 +02:00
Dan Holmsand c980ac0c3d Avoid warning messages from React in tests 2016-07-14 09:34:03 +02:00
Dan Holmsand bb2faefcbe Move add-on-dispose! to IDisposable
And pass the reaction to the dispose function.
2016-06-07 16:35:17 +02:00
Dan Holmsand 1280f58201 Make sure after-render fn is called immediately after render
when after-render is called during rendering. This should happen both
if the render is a part of the normal rendering loop, or if it is
triggered by render or force-update.
2016-05-31 23:09:43 +02:00
Dan Holmsand cd0863f1b2 Skip tests that require browser on node 2016-05-27 13:14:35 +02:00
Dan Holmsand d3ee4a7f8b Update figwheel and simplify doc app configuration 2016-05-27 12:55:13 +02:00
Dan Holmsand baf2107c15 Add test for nested with-let 2016-05-27 11:36:23 +02:00
Dan Holmsand 072cce4844 Add add-on-dispose! to Reaction 2016-05-26 17:41:30 +02:00
Dan Holmsand 00bfb8ed01 Make new tests pass in production mode 2016-05-01 15:18:26 +02:00
Dan Holmsand 7943a0018b Make demo site reload a little faster 2016-05-01 13:45:37 +02:00
Dan Holmsand e128117788 Improve exception-handling in reactions
Make sure exceptions in children of reactions don't end up
being caught in the reaction itself.
2016-05-01 13:09:12 +02:00
Dan Holmsand 1d912f0eaf Make sure force-update flushes queued reactions 2016-04-30 14:24:18 +02:00
Dan Holmsand 995acb6c34 Make reaction with error always throw on deref 2016-04-30 13:56:00 +02:00
Dan Holmsand 9631021da7 Make sure reactions continue to run after throw 2016-04-29 20:42:05 +02:00
Dan Holmsand 8ff44c81e6 Rerun tests by clicking on test results 2016-04-29 13:17:54 +02:00
Dan Holmsand 37b2954c3a Allow symbols, keywords and arbitrary cljs objects in markup
React no longer defaults to applying toString, and instead throws
confusing error messages when it encounters non-element objects.

This should make that happen less often.
2016-04-29 09:26:06 +02:00
Dan Holmsand 0dd46894f7 Merge branch 'reset-inside-reaction' of https://github.com/runningskull/reagent 2015-10-30 10:06:07 +01:00
Juan Patten 891609cd1a Fix bug where auto-run reactions might not re-run 2015-10-29 00:19:51 -06:00
Dan Holmsand cdee524fed Make argv more consistent when used from plain React 2015-10-28 12:43:35 +01:00
Dan Holmsand 63515236cb Make sure empty [:input] doesn't throw exception 2015-10-22 13:31:58 +02:00
Dan Holmsand 45b93c8145 Rename .' and .! to $ and $! respectively
This seems to be necessary to avoid trouble with bootstrapped cljs.

The old macros are still around, but deprecated.
2015-10-22 13:23:49 +02:00
Dan Holmsand 776c47491c Make sure lifecycle callbacks work when called as native component 2015-10-12 17:18:37 +02:00
Dan Holmsand 253cb999ba Call component functions with this set to current component
This makes us more consistent with React classes, and gives more
informative stack traces sometimes.

Also stop wrapping unknown methods - let React deal with them directly.
2015-10-11 15:04:50 +02:00
Dan Holmsand cdea2257f2 Revert to not munging names in interop 2015-10-11 13:26:43 +02:00
Dan Holmsand 32a9609b11 Add a few more tests for track 2015-10-08 23:12:32 +02:00
Dan Holmsand 3aea9849ec One more step towards React 0.14 2015-10-08 16:19:40 +02:00
Dan Holmsand fa48e61f47 Start move to React 0.14 2015-10-08 14:14:34 +02:00
Dan Holmsand 2a74cbb144 More tests for warnings 2015-10-07 21:37:26 +02:00
Dan Holmsand 1d1552960c Start testing warnings from components 2015-10-07 20:38:19 +02:00
Dan Holmsand 7f189d7595 Fix lifecycle test 2015-10-07 19:58:00 +02:00
Dan Holmsand ec769d0c3c Print function names instead of source in warnings/errors 2015-10-07 19:50:29 +02:00
Dan Holmsand e79132c1f3 Always queue updates in reactions, even when flushing 2015-10-07 11:32:42 +02:00
Dan Holmsand e6b32c6aee Allow raw React classes to be used with [:> comp ...] 2015-10-06 14:27:44 +02:00
Dan Holmsand 533c05aaca Allow output from create-class to be used directly by React 2015-10-06 12:49:47 +02:00
Dan Holmsand de1e4d4ad5 Get rid of silent in ratom
And some small cleanup
2015-10-04 12:53:23 +02:00
Dan Holmsand d0f480f3f2 Remove hack to support sync reactions
It became too messy, risky and confusing to be worth it.
2015-09-30 09:40:57 +02:00
Dan Holmsand 3fca2e5d41 Make reactions async by queueing changes instead
Reactions now put themselves in a queue when they get a
callback from an atom. The queue is flushed before rendering, and
on deref on individual reactions.

This turns out to perform much better in many cases.
2015-09-30 08:56:06 +02:00
Dan Holmsand 6e3a2b415d Fix stupid with-let bug 2015-09-27 00:07:19 +02:00
Dan Holmsand 415ecd64fd Simplify with-let and tweak performance 2015-09-26 13:12:59 +02:00
Dan Holmsand 5fceda2aae Add tests for lifecycle methods 2015-09-25 13:44:10 +02:00
Dan Holmsand 64d1e11966 Add obj and munging to interop
.' and .! now behaves just like builtin interop, except that
they work the same under advanced compilation.
2015-09-25 11:48:50 +02:00
Dan Holmsand 55a4b4e1df Omit tests running in node 2015-09-25 11:48:11 +02:00
Dan Holmsand e4fee70ac2 Add support for trapping warning/error messages
And use in test for with-let
2015-09-24 17:02:18 +02:00
Dan Holmsand cfcf356743 Add track, track!, dispose! and with-let to core 2015-09-24 10:19:30 +02:00
Dan Holmsand 034ffa6b7f More tests for with-let 2015-09-24 09:23:21 +02:00
Dan Holmsand 28d454ece9 Include size of cached reactions in tests 2015-09-24 07:48:03 +02:00
Dan Holmsand e1585f6730 Add more with-let tests, and fix dispose bug 2015-09-23 19:40:19 +02:00
Dan Holmsand 9163695832 Start adding more tests for with-let 2015-09-23 17:02:48 +02:00
Dan Holmsand 119fbfe173 Add a couple of more tests for with-let 2015-09-23 15:55:57 +02:00
Dan Holmsand 51163c1d07 Rename to with-let, add basic test 2015-09-23 10:39:49 +02:00
Dan Holmsand a73761e72e Warn if the same with-kept is used more than once 2015-09-21 10:49:43 +02:00
Dan Holmsand 6c9f71e511 Rename testmonitor 2015-09-19 19:03:29 +02:00
Dan Holmsand ca5ce00c34 Rename monitor -> track, and monitor! -> track! 2015-09-19 16:49:13 +02:00
Dan Holmsand 54ca0f927f Make monitor! run immediately
and async reaction not schedule anything from start
2015-09-15 18:11:36 +02:00
Dan Holmsand 87758ae396 Extend test for rswap! 2015-09-14 19:39:44 +02:00
Dan Holmsand e11c881aa7 Add rswap!
Works just like swap!, except that it allows recursive swaps on
the same atom, and it always returns nil.
2015-09-14 19:35:48 +02:00
Dan Holmsand 8e7624ea45 Add a test for monitor! 2015-09-14 18:14:13 +02:00
Dan Holmsand d362e0a26c Mix calling style a bit in tests 2015-09-14 13:34:54 +02:00
Dan Holmsand e05c74e6a5 More tests for monitor 2015-09-14 09:09:04 +02:00
Dan Holmsand b0d86598ce Start to add tests for monitor 2015-09-13 20:31:31 +02:00
Dan Holmsand ee72c60d3a Start implementing monitor 2015-09-13 18:17:38 +02:00
Dan Holmsand e12716da5d Log caught errors instead of rethrowing 2015-09-13 14:30:19 +02:00
Dan Holmsand 04daf6ac57 Exceptions from reactions are now thrown on deref only 2015-09-13 11:00:46 +02:00
Dan Holmsand b036cf938e Complete async testing 2015-09-12 19:13:31 +02:00
Dan Holmsand 544a3339d0 Start testing async reaction 2015-09-12 18:34:10 +02:00
Dan Holmsand b0395b5461 Make reaction notify only when it actually changes 2015-09-11 20:37:23 +02:00
Dan Holmsand b1acdea090 Use lazy reactions in components 2015-09-11 15:06:42 +02:00
Dan Holmsand f785362b46 Some cleanup 2015-09-10 21:27:02 +02:00
Dan Holmsand 0b77d9af31 Get rid of active? 2015-09-10 20:51:09 +02:00
Dan Holmsand 80a3c27fac Some performance tweaking 2015-09-10 18:30:00 +02:00
Dan Holmsand e09534c8cd Experiment with alternative to set 2015-09-10 17:40:55 +02:00
Dan Holmsand c4cd8c2921 wip: tests pass 2015-08-31 11:36:42 +02:00
Dan Holmsand be7bb69548 wip 2015-08-31 10:59:59 +02:00
Dan Holmsand 6c345db29e Now almost working 2015-08-31 10:39:17 +02:00
Dan Holmsand 1782ff1832 wip - not working 2015-08-31 10:05:53 +02:00
Dan Holmsand b77b182d67 Work around clojurescript problem with sorted-maps 2015-08-31 08:18:45 +02:00
Dan Holmsand 3defd24c35 Add a test for component-path 2015-08-30 18:29:27 +02:00
Dan Holmsand eed924311e Add force-update 2015-08-20 14:59:13 +02:00