Skip to content

Commit 188a8ff

Browse files
committed
fix test
1 parent 8373f6d commit 188a8ff

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,25 +168,37 @@ test.describe('Edge runtime', () => {
168168
expect(edgerouteTransaction2.contexts?.trace?.op).toBe('http.server');
169169
expect(edgerouteTransaction3.contexts?.trace?.op).toBe('http.server');
170170

171-
expect(edgerouteTransaction1.spans).toContainEqual({
172-
description: 'GET https://github.com/',
173-
});
174-
expect(edgerouteTransaction2.spans).toContainEqual({
175-
description: 'GET https://github.com/',
176-
});
177-
expect(edgerouteTransaction3.spans).toContainEqual({
178-
description: 'GET https://github.com/',
179-
});
171+
expect(edgerouteTransaction1.spans).toContainEqual(
172+
expect.objectContaining({
173+
description: 'GET https://github.com/',
174+
}),
175+
);
176+
expect(edgerouteTransaction2.spans).toContainEqual(
177+
expect.objectContaining({
178+
description: 'GET https://github.com/',
179+
}),
180+
);
181+
expect(edgerouteTransaction3.spans).toContainEqual(
182+
expect.objectContaining({
183+
description: 'GET https://github.com/',
184+
}),
185+
);
180186
// Does not contain span that is sent to the event proxy server
181-
expect(edgerouteTransaction1.spans).not.toContainEqual({
182-
description: expect.stringContaining('https://localhost:3031'),
183-
});
184-
expect(edgerouteTransaction2.spans).not.toContainEqual({
185-
description: expect.stringContaining('https://localhost:3031'),
186-
});
187-
expect(edgerouteTransaction3.spans).not.toContainEqual({
188-
description: expect.stringContaining('https://localhost:3031'),
189-
});
187+
expect(edgerouteTransaction1.spans).not.toContainEqual(
188+
expect.objectContaining({
189+
description: expect.stringContaining('https://localhost:3031'),
190+
}),
191+
);
192+
expect(edgerouteTransaction2.spans).not.toContainEqual(
193+
expect.objectContaining({
194+
description: expect.stringContaining('https://localhost:3031'),
195+
}),
196+
);
197+
expect(edgerouteTransaction3.spans).not.toContainEqual(
198+
expect.objectContaining({
199+
description: expect.stringContaining('https://localhost:3031'),
200+
}),
201+
);
190202
});
191203
});
192204

0 commit comments

Comments
 (0)