Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Sep 29, 2022
1 parent fc243c7 commit 715d6a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 9 additions & 3 deletions packages/remix-server-runtime/__tests__/server-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ describe("shared server runtime", () => {
});

let result = await handler(request);
expect(await result.text()).toBe("Unexpected Server Error\n\nError: should be logged when resource loader throws");
expect(await result.text()).toBe(
"Unexpected Server Error\n\nError: should be logged when resource loader throws"
);
});

test("resource route loader responds with detailed error when thrown in development", async () => {
Expand Down Expand Up @@ -370,7 +372,9 @@ describe("shared server runtime", () => {
});

let result = await handler(request);
expect(await result.text()).toBe("Unexpected Server Error\n\nError: should be logged when resource loader throws");
expect(await result.text()).toBe(
"Unexpected Server Error\n\nError: should be logged when resource loader throws"
);
});

test("resource route action responds with detailed error when thrown in development", async () => {
Expand Down Expand Up @@ -1636,7 +1640,9 @@ describe("shared server runtime", () => {

let result = await handler(request);
expect(result.status).toBe(500);
expect(await result.text()).toBe("Unexpected Server Error\n\nError: rofl");
expect(await result.text()).toBe(
"Unexpected Server Error\n\nError: rofl"
);
expect(rootLoader.mock.calls.length).toBe(0);
expect(indexLoader.mock.calls.length).toBe(0);

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ export function createRouter(init: RouterInit): Router {
// a revalidation interrupting an actionReload)
if (!isUninterruptedRevalidation) {
revalidatingFetchers.forEach(([key]) => {
const fetcher = state.fetchers.get(key);
let fetcher = state.fetchers.get(key);
let revalidatingFetcher: FetcherStates["Loading"] = {
state: "loading",
data: fetcher && fetcher.data,
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-server-runtime/router/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export function generatePath<Path extends string>(
return params[key]!;
})
.replace(/(\/?)\*/, (_, prefix, __, str) => {
const star = "*" as PathParam<Path>;
let star = "*" as PathParam<Path>;

if (params[star] == null) {
// If no splat was provided, trim the trailing slash _unless_ it's
Expand Down Expand Up @@ -989,7 +989,7 @@ export class DeferredData {
this.unlistenAbortSignal();
}

const subscriber = this.subscriber;
let subscriber = this.subscriber;
if (error) {
Object.defineProperty(promise, "_error", { get: () => error });
subscriber && subscriber(false);
Expand Down

0 comments on commit 715d6a3

Please sign in to comment.