Commit Graph
17 Commits
Author SHA1 Message Date
David Lechner 31fb3b9e4c test: drop state from AsyncSaga constructor params
This uses the real rootReducer to populate the initial state in the test
AsyncSaga. This way we don't have to populate default values. Since it
isn't used often, we can omit the parameter and just call the updateState()
method after creating the object if modifications are needed.
2022-03-11 16:04:09 -06:00
David Lechner 7b08d8a7bf test: drop RecursivePartial type
There is an existing type we can use instead.
2022-03-11 15:42:42 -06:00
David Lechner b37209683b test: extend testRender to return spy on dispatch 2022-03-10 02:00:14 -06:00
David Lechner 6afee4b6d6 test: add testRender()
This adds a testRender() helper function to simplify UI tests. Instead
of mocking the redux store, we use the real thing.
2022-03-09 17:24:46 -06:00
David Lechner 569217d5dc editor: don't put editor in redux store
The redux store should not have non-serializable objects like the editor
in it.
2022-03-02 18:56:47 -06:00
David Lechner 994540e263 actions: fix missed refactoring
Missed some renames when refactoring that weren't picked up locally
for some reason.
2022-02-26 12:55:49 -06:00
David Lechner 5d9040647b fix two-level merging of state in tests 2021-01-23 15:46:20 -06:00
David Lechner c1c08e5ced add state initializer in async saga constructor 2021-01-22 15:58:10 -06:00
David Lechner 08fea237c9 change setState() to updateState()
this way we don't wipe out state if we change a different value
2021-01-22 15:58:10 -06:00
David Lechner caacaad341 use recursive partial so we don't have to use "as" 2021-01-22 10:35:11 -06:00
David Lechner da298ab565 add some tests for notification sagas 2021-01-18 17:29:04 -06:00
David Lechner b6bda26484 fix error handling in test saga
Jest used to define fail() but doesn't seem to do this anymore.
Replace it with throwing an error instead, which is basically the
same thing.
2021-01-14 10:50:28 -06:00
David Lechner 71ad9c1b1b Update to create-react-app 4
- had to update eslint deps
- ran into https://github.com/palantir/blueprint/issues/4112
- had to move beta.svg out of static/
- had to fix prettier formatting changes
- ran into https://github.com/facebook/jest/issues/7780
2020-11-20 21:08:53 -06:00
David Lechner c3d4a07053 fix TextEncoder/TextDecoder on CI
was working locally but not on CI for some reason
2020-06-10 21:59:34 -05:00
David Lechner 17cb5a32d5 convert editor service to saga 2020-06-10 21:59:34 -05:00
David Lechner 5c3ec89e3b add test for editor saga 2020-06-10 21:59:34 -05:00
David Lechner 31c3e2b52e refactor common test helpers into test/
This way we can share them with multiple tests
2020-06-10 21:59:34 -05:00