Testování reducerů a async akcí bez integračního prostředí: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

21 August 2026

  • curprev 21:2121:21, 21 August 2026 JorgCoppin5 talk contribs m 5,808 bytes +612 No edit summary undo
  • curprev 19:1519:15, 21 August 2026 FredricHouck5 talk contribs 5,196 bytes +5,196 Created page with "Pro asynchronní akce budete potřebovat simulovat store. Nejjednodušší je použít redux-mock-store, který vám umožní zachytit dispatchované akce. Vytvoříte mock store s inicializovaným stavem, zavoláte akci a poté zkontrolujete, jaké akce byly odeslány. Tento přístup funguje skvěle pro thunky, ale pozor na to, že mock store neprovádí reducery. Pokud potřebujete otestovat i změny stavu, musíte použít jiný přístup – buď vytvořit skutečn..."