Skip to content
Merged

Fixes #8564

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions e2e/qwik-e2e/tests/qwikrouter/ssg-snapshot.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,25 @@ test.describe('router ssg snapshot', () => {
manifestHash
);

let expectedHtml = (await readFile(expectedHtmlPath, 'utf-8').catch(() => '')).replace(
/\r\n/g,
'\n'
);
let expectedState = (await readFile(expectedStatePath, 'utf-8').catch(() => '')).replace(
/\r\n/g,
'\n'
);

warnIfSizeChanged('readable state dump', expectedState, normalizedState);
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);

if (process.env.UPDATE_SSG_SNAPSHOT === '1') {
await writeFile(expectedHtmlPath, normalizedHtml, 'utf-8');
await writeFile(expectedStatePath, normalizedState, 'utf-8');
expectedHtml = normalizedHtml;
expectedState = normalizedState;
}

const expectedHtml = (await readFile(expectedHtmlPath, 'utf-8')).replace(/\r\n/g, '\n');
const expectedState = (await readFile(expectedStatePath, 'utf-8')).replace(/\r\n/g, '\n');

warnIfSizeChanged('readable state dump', expectedState, normalizedState);
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);

expect(normalizedState).toEqual(expectedState);
expect(normalizedHtml).toEqual(expectedHtml);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik/src/core/shared/error/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { logErrorAndStop } from '../utils/log';
import { qDev } from '../utils/qdev';
import { isObject } from '../utils/types';

const baseUrl = 'https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#Q';
const baseUrl = 'https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#q';
export const codeToText = (code: number, ...parts: any[]): string => {
if (qDev) {
// Keep one error, one line to make it easier to search for the error message.
Expand Down
Loading