Skip to content

Commit 7d8fa8c

Browse files
cliffhallclaude
andcommitted
test(everything): cover both output types for the HTTP error case
The "resource" output type embeds the gzip and never registers a session resource, so the no-resource assertion only guards anything on "resourceLink". Run each error route under both output types. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 81a1e63 commit 7d8fa8c

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

‎src/everything/__tests__/gzip-file-as-resource.test.ts‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,18 +250,23 @@ describe("gzip-file-as-resource with an HTTP error response (#5207)", () => {
250250
await new Promise((resolve) => errors.close(resolve));
251251
});
252252

253+
// Both output types: "resource" is the embedded path the issue reproduced,
254+
// and "resourceLink" is the one that would register a session resource, so
255+
// it is what the listResources assertion guards.
253256
it.each([
254-
["/missing", "404 Not Found"],
255-
["/server-error", "500 Internal Server Error"],
257+
["/missing", "404 Not Found", "resource"],
258+
["/server-error", "500 Internal Server Error", "resource"],
259+
["/missing", "404 Not Found", "resourceLink"],
260+
["/server-error", "500 Internal Server Error", "resourceLink"],
256261
])(
257-
"fails on %s with HTTP %s and registers no resource",
258-
async (path, status) => {
262+
"fails on %s with HTTP %s (outputType %s) and registers no resource",
263+
async (path, status, outputType) => {
259264
const s = await open();
260265
const url = `${errorBase}${path}`;
261266
const result = await gzip(s, {
262267
name: "error.gz",
263268
data: url,
264-
outputType: "resource",
269+
outputType,
265270
});
266271
expect(result).toEqual({
267272
isError: true,

0 commit comments

Comments
 (0)