Skip to content

Commit d19392a

Browse files
committed
style(tests): Run yarn fix
1 parent e13ad53 commit d19392a

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

dev-packages/opentelemetry-v2-tests/test/integration/transactions.test.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -548,57 +548,57 @@ describe('Integration | Transactions', () => {
548548
expect(finishedSpans.length).toBe(0);
549549
});
550550

551-
it('collects child spans that are finished within 5 minutes their parent span has been sent', async () => {
552-
const timeout = 5 * 60 * 1000;
553-
const now = Date.now();
554-
vi.useFakeTimers();
555-
vi.setSystemTime(now);
551+
it('collects child spans that are finished within 5 minutes their parent span has been sent', async () => {
552+
const timeout = 5 * 60 * 1000;
553+
const now = Date.now();
554+
vi.useFakeTimers();
555+
vi.setSystemTime(now);
556556

557-
const logs: unknown[] = [];
558-
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
557+
const logs: unknown[] = [];
558+
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
559559

560-
const transactions: Event[] = [];
560+
const transactions: Event[] = [];
561561

562-
mockSdkInit({
563-
tracesSampleRate: 1,
564-
beforeSendTransaction: event => {
565-
transactions.push(event);
566-
return null;
567-
},
568-
});
562+
mockSdkInit({
563+
tracesSampleRate: 1,
564+
beforeSendTransaction: event => {
565+
transactions.push(event);
566+
return null;
567+
},
568+
});
569569

570-
const provider = getProvider();
571-
const spanProcessor = getSpanProcessor();
570+
const provider = getProvider();
571+
const spanProcessor = getSpanProcessor();
572572

573-
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;
573+
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;
574574

575-
if (!exporter) {
576-
throw new Error('No exporter found, aborting test...');
577-
}
575+
if (!exporter) {
576+
throw new Error('No exporter found, aborting test...');
577+
}
578578

579-
startSpanManual({ name: 'test name' }, async span => {
580-
const subSpan = startInactiveSpan({ name: 'inner span 1' });
581-
subSpan.end();
579+
startSpanManual({ name: 'test name' }, async span => {
580+
const subSpan = startInactiveSpan({ name: 'inner span 1' });
581+
subSpan.end();
582582

583-
const subSpan2 = startInactiveSpan({ name: 'inner span 2' });
583+
const subSpan2 = startInactiveSpan({ name: 'inner span 2' });
584584

585-
span.end();
585+
span.end();
586586

587-
setTimeout(() => {
588-
subSpan2.end();
589-
}, timeout - 2);
590-
});
587+
setTimeout(() => {
588+
subSpan2.end();
589+
}, timeout - 2);
590+
});
591591

592-
vi.advanceTimersByTime(timeout - 1);
592+
vi.advanceTimersByTime(timeout - 1);
593593

594-
expect(transactions).toHaveLength(2);
595-
expect(transactions[0]?.spans).toHaveLength(1);
594+
expect(transactions).toHaveLength(2);
595+
expect(transactions[0]?.spans).toHaveLength(1);
596596

597-
const finishedSpans: any = exporter['_finishedSpanBuckets'].flatMap(bucket =>
598-
bucket ? Array.from(bucket.spans) : [],
599-
);
600-
expect(finishedSpans.length).toBe(0);
601-
});
597+
const finishedSpans: any = exporter['_finishedSpanBuckets'].flatMap(bucket =>
598+
bucket ? Array.from(bucket.spans) : [],
599+
);
600+
expect(finishedSpans.length).toBe(0);
601+
});
602602

603603
it('discards child spans that are finished after 5 minutes their parent span has been sent', async () => {
604604
const timeout = 5 * 60 * 1000;

0 commit comments

Comments
 (0)