Skip to content

Commit 8c0365f

Browse files
committed
👌 Fix formatting and linting
1 parent 7f83c2f commit 8c0365f

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

‎packages/core/test/emulate/mockXhr.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export class MockXhr extends MockEventTarget {
4646
this.hasEnded = false
4747
}
4848

49-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5049
setRequestHeader(_name: string, _value: string) {
5150
// noop - headers are tracked via instrumentation
5251
}

‎test/e2e/scenario/rum/resources.scenario.ts‎

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,15 @@ test.describe('resource headers with trackResourceHeaders', () => {
513513
createTest('collect default request headers for XHR when trackResourceHeaders is true')
514514
.withRum(TRACK_RESOURCE_HEADERS_CONFIG)
515515
.run(async ({ intakeRegistry, flushEvents, page }) => {
516-
await page.evaluate(() =>
517-
new Promise<void>((resolve) => {
518-
const xhr = new XMLHttpRequest()
519-
xhr.addEventListener('loadend', () => resolve())
520-
xhr.open('POST', '/ok')
521-
xhr.setRequestHeader('Content-Type', 'application/json')
522-
xhr.send(JSON.stringify({ key: 'value' }))
523-
})
516+
await page.evaluate(
517+
() =>
518+
new Promise<void>((resolve) => {
519+
const xhr = new XMLHttpRequest()
520+
xhr.addEventListener('loadend', () => resolve())
521+
xhr.open('POST', '/ok')
522+
xhr.setRequestHeader('Content-Type', 'application/json')
523+
xhr.send(JSON.stringify({ key: 'value' }))
524+
})
524525
)
525526

526527
await flushEvents()
@@ -538,15 +539,16 @@ test.describe('resource headers with trackResourceHeaders', () => {
538539
trackResourceHeaders: ['x-custom-request'],
539540
})
540541
.run(async ({ intakeRegistry, flushEvents, page }) => {
541-
await page.evaluate(() =>
542-
new Promise<void>((resolve) => {
543-
const xhr = new XMLHttpRequest()
544-
xhr.addEventListener('loadend', () => resolve())
545-
xhr.open('POST', '/ok')
546-
xhr.setRequestHeader('Content-Type', 'application/json')
547-
xhr.setRequestHeader('x-custom-request', 'request-value')
548-
xhr.send(JSON.stringify({ key: 'value' }))
549-
})
542+
await page.evaluate(
543+
() =>
544+
new Promise<void>((resolve) => {
545+
const xhr = new XMLHttpRequest()
546+
xhr.addEventListener('loadend', () => resolve())
547+
xhr.open('POST', '/ok')
548+
xhr.setRequestHeader('Content-Type', 'application/json')
549+
xhr.setRequestHeader('x-custom-request', 'request-value')
550+
xhr.send(JSON.stringify({ key: 'value' }))
551+
})
550552
)
551553

552554
await flushEvents()

0 commit comments

Comments
 (0)