Skip to content

Commit

Permalink
sidebarSlice.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamlangford committed Aug 19, 2024
1 parent 2e1a3ec commit 256a7ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/store/sidebar/sidebarSlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ describe("sidebarSlice.addTemporaryPanel", () => {
temporaryPanels: [existingPanel, otherExistingPanel],
};

// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/ban-ts-comment -- Flaky error
// @ts-ignore-error "Type instantiation is excessively deep and possibly infinite"
const store = configureStore({
reducer: { sidebar: sidebarSlice.reducer },
preloadedState: { sidebar: initialState },
Expand Down Expand Up @@ -609,23 +611,23 @@ describe("sidebarSlice.fixActiveTabOnRemove", () => {
modComponentId: extensionId,
}),
});
const nullModId = sidebarEntryFactory("form", {
const undefinedModId = sidebarEntryFactory("form", {
modComponentRef: modComponentRefFactory({
modComponentId: extensionId,
modId: null,
modId: undefined,
}),
});
const newPanel = sidebarEntryFactory("temporaryPanel", {
modComponentRef: modComponentRefFactory({
modComponentId: extensionId,
modId: null,
modId: undefined,
}),
});

const state = {
...sidebarSlice.getInitialState(),
activeKey: eventKeyForEntry(newPanel),
forms: [firstFormPanel, nullModId],
forms: [firstFormPanel, undefinedModId],
panels: [originalPanel],
temporaryPanels: [],
} as SidebarState;
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.strictNullChecks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"strictNullChecks": true
},
"files": [
"./store/sidebar/sidebarSlice.test.ts",
"./background/contextMenus/initContextMenus.ts",
"./extensionConsole/pages/packageEditor/EditPage.tsx",
"./components/formBuilder/FormBuilder.tsx",
Expand Down

0 comments on commit 256a7ac

Please sign in to comment.