Commit Graph
13 Commits
Author SHA1 Message Date
David Lechner 71a6727a8f firmware/actions: reuse isError from utils
Remove duplicate isError function.
2026-01-04 17:27:08 -06:00
David Lechner 8b6939a983 utils: extract acquireLock function from fileStorage 2022-05-19 12:03:10 -05:00
David Lechner c29ca56658 utils: fix defined()
NonNullable means both not undefined and not null.
2022-04-06 18:16:21 -05:00
David Lechner 12f34eb210 utils: add new timestamp function
This will be used to create suggested file names that include a timestamp.
2022-03-01 14:42:45 -06:00
David Lechner e7d44ea9a9 src/utils: add ensureError() function
Typescript v4.4 no longer assumes that the error in catch is an Error
object [1]. This adds a helper function to ensure that caught errors
at least match the Error interface. If not, it creates a new Error
object with the value as the message.

[1]: https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-beta/#using-unknown-in-catch-variables
2021-08-30 13:06:01 -05:00
David Lechner 218dda4d0b use typed-redux-saga in flash-firmware sagas
This make things a bit more type safe and a bit easier to read.
2021-01-21 22:22:46 -06:00
David Lechner ab0c850b80 add proper error handling for firmware zip error 2021-01-21 19:49:53 -06: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
David Lechner b6be163ccb refactor lookup function 2020-06-08 20:56:00 -05:00
David Lechner 9d789c13e1 add test for util.assert 2020-05-27 20:57:22 -05:00
David Lechner 6713afe198 Add util funciton to format as hex 2020-05-26 21:20:08 -05:00
David Lechner dd9d789e9a license 2020-05-22 19:54:48 -05:00
David Lechner 3b22c0377f add tests for bootloader message decoder
also fix errors found by test
2020-05-21 21:27:47 -05:00