Skip to content

Commit 8b86d9b

Browse files
authored
Merge pull request #8564 from QwikDev/fixes
Fixes
2 parents 1aeba8a + f8e23a4 commit 8b86d9b

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

e2e/qwik-e2e/tests/qwikrouter/ssg-snapshot.e2e.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,25 @@ test.describe('router ssg snapshot', () => {
3535
manifestHash
3636
);
3737

38+
let expectedHtml = (await readFile(expectedHtmlPath, 'utf-8').catch(() => '')).replace(
39+
/\r\n/g,
40+
'\n'
41+
);
42+
let expectedState = (await readFile(expectedStatePath, 'utf-8').catch(() => '')).replace(
43+
/\r\n/g,
44+
'\n'
45+
);
46+
47+
warnIfSizeChanged('readable state dump', expectedState, normalizedState);
48+
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);
49+
3850
if (process.env.UPDATE_SSG_SNAPSHOT === '1') {
3951
await writeFile(expectedHtmlPath, normalizedHtml, 'utf-8');
4052
await writeFile(expectedStatePath, normalizedState, 'utf-8');
53+
expectedHtml = normalizedHtml;
54+
expectedState = normalizedState;
4155
}
4256

43-
const expectedHtml = (await readFile(expectedHtmlPath, 'utf-8')).replace(/\r\n/g, '\n');
44-
const expectedState = (await readFile(expectedStatePath, 'utf-8')).replace(/\r\n/g, '\n');
45-
46-
warnIfSizeChanged('readable state dump', expectedState, normalizedState);
47-
warnIfSizeChanged('HTML', expectedHtml, normalizedHtml);
48-
4957
expect(normalizedState).toEqual(expectedState);
5058
expect(normalizedHtml).toEqual(expectedHtml);
5159
});

packages/qwik/src/core/shared/error/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { logErrorAndStop } from '../utils/log';
22
import { qDev } from '../utils/qdev';
33
import { isObject } from '../utils/types';
44

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

0 commit comments

Comments
 (0)