Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Apr 2, 2024
1 parent 7427b7c commit 319c46b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 77 deletions.
4 changes: 2 additions & 2 deletions src/store/features/project/projectActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const addFileToProject = createAction<string>("project/addFile");
* Save
*/

const saveProject = createAsyncThunk<void, string | undefined>(
const saveProject = createAsyncThunk<void>(
"project/saveProject",
async (_newPath, thunkApi) => {
async (_, thunkApi) => {
const state = thunkApi.getState() as RootState;

if (!state.document.loaded) {
Expand Down
2 changes: 1 addition & 1 deletion test/store/features/music/musicMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test("Should trigger call to play music", async () => {
middleware(store)(next)(action);

expect(loadSpy).toBeCalledWith(
"file:///root/path/assets/music/track1.mod",
"gbs://project/assets/music/track1.mod",
false
);
});
Expand Down
2 changes: 0 additions & 2 deletions test/store/features/project/loadProject.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ test("Should change the path and root to new path and root and set loaded to tru
);
const newState = reducer(state, action);
expect(newState.loaded).toBe(true);
expect(newState.path).toBe("new_test_root/project_copy.gbsproj");
expect(newState.root).toBe("new_test_root");
expect(newState.modified).toBe(false);
});
4 changes: 0 additions & 4 deletions test/store/features/project/saveProject.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ test("Should not change the path and root if saving existing project", () => {
const state = {
...initialState,
saving: true,
path: "initial_test_root/project.gbsproj",
root: "initial_test_root/",
modified: true,
};
const action = actions.saveProject.fulfilled(
Expand All @@ -18,7 +16,5 @@ test("Should not change the path and root if saving existing project", () => {
);
const newState = reducer(state, action);
expect(newState.saving).toBe(false);
expect(newState.path).toBe("initial_test_root/project.gbsproj");
expect(newState.root).toBe("initial_test_root/");
expect(newState.modified).toBe(false);
});
68 changes: 0 additions & 68 deletions test/store/features/project/saveProjectAs.test.ts

This file was deleted.

0 comments on commit 319c46b

Please sign in to comment.