Skip to content

Commit 3466069

Browse files
chargomeclaude
andcommitted
test(remix): Surface build output and upload details in source map e2e
The cross-check assertion failed with no indication of why: the build script swallowed the plugin's debug output, and the assertion reported neither the client chunk names nor the uploaded ones. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 34fa1ed commit 3466069

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎dev-packages/e2e-tests/test-applications/remix-sourcemaps/assert-build.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ for (const chunk of chunks) {
9696
crossCheckedChunks++;
9797
}
9898

99-
assert.ok(crossCheckedChunks > 0, 'Expected at least one uploaded chunk to cross-check debug IDs against');
99+
assert.ok(
100+
crossCheckedChunks > 0,
101+
'Expected at least one uploaded chunk to cross-check debug IDs against.\n' +
102+
`Client chunks: ${JSON.stringify(chunks.map(chunk => path.basename(chunk)))}\n` +
103+
`Uploaded JS names: ${JSON.stringify([...uploadedJsFiles])}\n` +
104+
`Uploaded JS urls: ${JSON.stringify(debugIdPairs.map(pair => pair.jsUrl))}`,
105+
);
100106
console.log(`${crossCheckedChunks} chunk(s) ship a debug ID that was uploaded\n`);
101107

102108
console.log('All remix source map assertions passed!');

‎dev-packages/e2e-tests/test-applications/remix-sourcemaps/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sideEffects": false,
44
"type": "module",
55
"scripts": {
6-
"build": "node start-mock-sentry-server.mjs & remix vite:build > .tmp_build_stdout 2> .tmp_build_stderr; BUILD_EXIT=$?; kill %1 2>/dev/null; exit $BUILD_EXIT",
6+
"build": "node start-mock-sentry-server.mjs & remix vite:build > .tmp_build_stdout 2> .tmp_build_stderr; BUILD_EXIT=$?; kill %1 2>/dev/null; cat .tmp_build_stdout .tmp_build_stderr; exit $BUILD_EXIT",
77
"clean": "npx rimraf node_modules pnpm-lock.yaml",
88
"test:build": "pnpm install && pnpm build",
99
"test:assert": "pnpm tsx assert-build.ts"

0 commit comments

Comments
 (0)