mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
actions: simplify usage of Matchable
This removes use of the pseudo-internal toString() function and also removes extraneous uses of ReturnType<>. Also, a new when() method is added to simplify additional uses.
This commit is contained in:
@@ -82,7 +82,7 @@ it('should dispatch fail action if file does not exist', async () => {
|
||||
saga.put(fileStorageReadFile(testFileName));
|
||||
|
||||
action = await saga.take();
|
||||
expect(action).toHaveProperty('type', fileStorageDidFailToReadFile.toString());
|
||||
expect(fileStorageDidFailToReadFile.matches(action)).toBeTruthy();
|
||||
|
||||
await saga.end();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user