Skip to content

Commit e1063bc

Browse files
committed
fix(test): deduplicates reset helpers and stabilizes timing test
- resetViewStore delegates to resetViewState (single source of truth) - increases pooled concurrency test delay from 5ms to 20ms (fixes flake)
1 parent a0d51e4 commit e1063bc

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

tests/helpers/index.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { render } from "@solidjs/testing-library";
22
import { MemoryRouter, createMemoryHistory } from "@solidjs/router";
3-
import { updateViewState } from "../../src/app/stores/view";
3+
import { resetViewState } from "../../src/app/stores/view";
44
import type { Issue, PullRequest, WorkflowRun, ApiError } from "../../src/app/services/api";
55
import type { JSX } from "solid-js";
66

@@ -103,17 +103,5 @@ export function renderWithRouter(
103103
}
104104

105105
export function resetViewStore(): void {
106-
updateViewState({
107-
lastActiveTab: "issues",
108-
sortPreferences: {},
109-
ignoredItems: [],
110-
globalFilter: { org: null, repo: null },
111-
tabFilters: {
112-
issues: { role: "all", comments: "all" },
113-
pullRequests: { role: "all", reviewDecision: "all", draft: "all", checkStatus: "all", sizeCategory: "all" },
114-
actions: { conclusion: "all", event: "all" },
115-
},
116-
showPrRuns: false,
117-
expandedRepos: { issues: {}, pullRequests: {}, actions: {} },
118-
});
106+
resetViewState();
119107
}

tests/services/api-optimization.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ describe("workflow run concurrency", () => {
591591

592592
it("processes repos faster with pooled concurrency than sequential chunks", async () => {
593593
const repos = makeRepos(30);
594-
const DELAY_MS = 5;
594+
const DELAY_MS = 20;
595595

596596
const makeTimedOctokit = () => ({
597597
request: vi.fn(async () => {

0 commit comments

Comments
 (0)