Skip to content

Commit 0bc61d1

Browse files
committed
fix one test
1 parent 2763535 commit 0bc61d1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

packages/remix/test/integration/test/server/loader.test.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,23 @@ describe.each(['builtin', 'express'])('Remix API Loaders with adapter = %s', ada
5151
const env = await RemixTestEnv.init(adapter);
5252
const url = `${env.url}/loader-throw-response/-1`;
5353

54-
const envelopes = await env.getMultipleEnvelopeRequest({ url, count: 1, envelopeType: ['event'] });
55-
const event = envelopes[0][2];
54+
// We also wait for the transaction, even though we don't care about it for this test
55+
// but otherwise this may leak into another test
56+
const envelopes = await env.getMultipleEnvelopeRequest({ url, count: 2, envelopeType: ['event', 'transaction'] });
57+
58+
const event = envelopes[0][2].type === 'transaction' ? envelopes[1][2] : envelopes[0][2];
59+
const transaction = envelopes[0][2].type === 'transaction' ? envelopes[0][2] : envelopes[1][2];
60+
61+
assertSentryTransaction(transaction, {
62+
contexts: {
63+
trace: {
64+
status: 'unknown_error',
65+
data: {
66+
'http.response.status_code': 500,
67+
},
68+
},
69+
},
70+
});
5671

5772
assertSentryEvent(event, {
5873
exception: {

0 commit comments

Comments
 (0)