diff --git a/templates/src/client/app.ts b/templates/src/client/app.ts index 3773c37..43b0764 100644 --- a/templates/src/client/app.ts +++ b/templates/src/client/app.ts @@ -310,7 +310,7 @@ export function prepare_page(target: Target): Promise<{ }; } - const props = { path, query }; + const props = { path, query, error: null, status: null }; const data = { path, preloading: false, diff --git a/test/apps/AppRunner.ts b/test/apps/AppRunner.ts index 6a1a48c..077a3b7 100644 --- a/test/apps/AppRunner.ts +++ b/test/apps/AppRunner.ts @@ -58,7 +58,8 @@ export class AppRunner { start: () => this.page.evaluate(() => start()), prefetchRoutes: () => this.page.evaluate(() => prefetchRoutes()), prefetch: (href: string) => this.page.evaluate((href: string) => prefetch(href), href), - goto: (href: string) => this.page.evaluate((href: string) => goto(href), href) + goto: (href: string) => this.page.evaluate((href: string) => goto(href), href), + title: () => this.page.$eval('h1', node => node.textContent) }; } diff --git a/test/apps/errors/src/routes/enhance-your-calm.html b/test/apps/errors/src/routes/enhance-your-calm.html new file mode 100644 index 0000000..398584e --- /dev/null +++ b/test/apps/errors/src/routes/enhance-your-calm.html @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/test/apps/errors/src/routes/no-error.html b/test/apps/errors/src/routes/no-error.html new file mode 100644 index 0000000..8dc116a --- /dev/null +++ b/test/apps/errors/src/routes/no-error.html @@ -0,0 +1,3 @@ +