• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mobxjs / mobx-react-lite / 567
95%

Build:
DEFAULT BRANCH: master
Ran 28 Apr 2019 11:31AM UTC
Jobs 1
Files 15
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
567

push

travis-ci

FredyC
Schedule uncommitted reaction cleanup (#121)

* Test cleaning up reactions for uncommitted components

* First attempt at a fix for cleaning up reactions from uncommitted components

* Use debounce instead of fixed interval

* Add unit test for missing observable changes before useEffect runs

This is a test to check that observable changes made between the
first component render and commit are not lost.

It currently fails (and did so before the change in PR #119)

* Add test for cleanup timer firing too early for some components

This demonstrates (in a slightly contrived way) how, if the
cleanup timer fires between a recent component being
rendered and it being committed, that it would incorrectly
tidy up a reaction for a soon-to-be-committed component.

* Update test for missing changes to check Strict and non-Strict mode

We had an existing test to check that observable changes between render
and commit didn't go missing, but it only checked in Strict mode, and
there's a problem with non-Strict mode.

* Add cleanup tracking and more tests

This adds full cleanup tracking, and even more tests:

- we now track how long ago potentially leaked reactions
were created, and only clean those that were leaked 'a while ago'
- if a reaction is incorrectly disposed because a component
went away for a very long time and came back again later
(in a way React doesn't even do right now), we safely recreate it and re-render
- trap the situation where a change is made to a tracked observable
between first render and commit (where we couldn't force an update
because we hadn't _been_ committed) and force a re-render
- more unit tests

* Fix renamed test file

When I renamed this file, I forgot the .test. suffix. D'oh.

* Extract tracking and cleanup logic out to separate file

* Update src/useObserver.ts

Co-Authored-By: RoystonS <royston@shufflebotham.org>

* Move some more tracking internals into the tracking code

36 of 36 branches covered (100.0%)

Branch coverage included in aggregate %.

183 of 185 relevant lines covered (98.92%)

31.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 567.1 28 Apr 2019 11:31AM UTC 0
99.1
Travis Job 567.1
Source Files on build 567
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #567
  • 3eb0c835 on github
  • Prev Build on master (#566)
  • Next Build on master (#568)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc