enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.95k stars 2.01k forks source link

[Docs] `mount`/`shallow`: `update`: Bring the docs up to date with the implementation #2552

Closed fsoikin closed 2 years ago

fsoikin commented 2 years ago

I've noticed that the docs for update still say "should only be called on root", but this hasn't been the case for three years now (changed in https://github.com/enzymejs/enzyme/pull/1802).

Side note 1: the example in this file doesn't actually require an update() call. The text of the button does update just fine by itself. I played with it for some time just now, and couldn't come up with an example where an update call would be required. Could there have been some change recently that made update unnecessary?

Side note 2: the docs currently published on https://enzymejs.github.io/ seem outdated compared to the source code. I'm not sure what the publishing procedure would be, but I'm pretty sure I can't do it myself, because I don't have proper access.

codecov[bot] commented 2 years ago

Codecov Report

Merging #2552 (81a2967) into master (c8c74a4) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 81a2967 differs from pull request most recent head e8673c2. Consider uploading reports for the commit e8673c2 to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2552   +/-   ##
=======================================
  Coverage   96.31%   96.31%           
=======================================
  Files          49       49           
  Lines        4207     4207           
  Branches     1130     1130           
=======================================
  Hits         4052     4052           
  Misses        155      155           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c8c74a4...e8673c2. Read the comment docs.

ljharb commented 2 years ago

The docs match the last enzyme release, and will be updated whenever the next one is released.