trezor-suite
trezor-suite copied to clipboard
Strictly type Fixtures in tests
This is more of an informational proposal, but just to legitimize this:
- We have a lot of fixtures in the code-base that represents Actions (with payloads) without types.
- In case, we need to change the structure (type) of the payload of an action, those fixtures wont fail in type-check, but instead fail the test.
- It is sometimes very hard (time consuming) to find it and fix it.
=> Here, the types in fixtures will prevent this situation.
Examples of what I mean:
- https://github.com/trezor/trezor-suite/pull/12481/files#diff-df9442f25e42b3b042cccb55bda6961f55d810c73b1a0f00b8a3a0f0df6ec278R36
- https://github.com/trezor/trezor-suite/pull/12481/files#diff-2cde8c21c9acff3b1077bfcc524a941ae475cfdb4e5d40fb914bd0e0be9acd6eR88
- https://github.com/trezor/trezor-suite/pull/12481/files#diff-addb907b9f6d4eef1f4044a9a201ef2cdce9a3f7963a52afe1b793ccc3bc0584R11