Skip to content

Commit

Permalink
Simplify props
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Jul 10, 2024
1 parent f5f5b9b commit 878490d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions gui/test/app/StanSampler/useStanSampler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ const loadedSampler = async () => {
};

const rerenderableSampler = async () => {
const ret = renderHook(
(props: { url: string } | undefined) => useStanSampler(props?.url),
{ initialProps: undefined },
);
const ret = renderHook((url: string | undefined) => useStanSampler(url), {
initialProps: undefined,
});
const status = renderHook(
(sampler: StanSampler | undefined) => useSamplerStatus(sampler),
{
Expand Down Expand Up @@ -94,7 +93,7 @@ describe("useStanSampler", () => {

expect(statusResult.current.status).toBe("");

rerender({ url: mockCompiledMainJsUrl });
rerender(mockCompiledMainJsUrl);
rerenderStatus(result.current.sampler);

expect(statusResult.current.status).toBe("loading");
Expand All @@ -113,7 +112,7 @@ describe("useStanSampler", () => {

expect(statusResult.current.status).toBe("");

rerender({ url: erroringCompiledMainJsUrl });
rerender(erroringCompiledMainJsUrl);
rerenderStatus(result.current.sampler);

await waitFor(() => {
Expand Down

0 comments on commit 878490d

Please sign in to comment.