mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 18:46:17 +00:00
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.
This commit is contained in:
@@ -21,7 +21,7 @@ describe('handleExplorerImportFiles', () => {
|
||||
const testFileName = 'test.py';
|
||||
const testFileContents = '# test';
|
||||
|
||||
const saga = new AsyncSaga(explorer, { fileStorage: { fileNames: [] } });
|
||||
const saga = new AsyncSaga(explorer);
|
||||
|
||||
jest.spyOn(browserFsAccess, 'fileOpen').mockResolvedValueOnce([
|
||||
mock<FileWithHandle>({
|
||||
|
||||
Reference in New Issue
Block a user