-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
27 lines (26 loc) · 910 Bytes
/
test.ts
File metadata and controls
27 lines (26 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { describe, expect } from 'vitest';
import { createEsmAndCjsTests } from '../../../../utils/runner';
describe('outgoing fetch to data URL', () => {
createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument.mjs', (createRunner, test) => {
test('data URL in fetch request should be sanitized in span', async () => {
await createRunner()
.expect({
transaction: {
transaction: 'test-span',
spans: expect.arrayContaining([
expect.objectContaining({
description: 'GET <data:text/plain,base64>',
op: 'http.client',
data: expect.objectContaining({
url: '<data:text/plain,base64>',
'http.url': '<data:text/plain,base64>',
}),
}),
]),
},
})
.start()
.completed();
});
});
});