Skip to content

Commit

Permalink
fix: batchspanprocessor.test for TS > 4.6.0 (#3636)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSNev authored Feb 27, 2023
1 parent 7f63a6f commit 708afd0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ import { SpanExporter } from '../../../src';
import { BatchSpanProcessor } from '../../../src/platform/browser/export/BatchSpanProcessor';
import { TestTracingSpanExporter } from '../../common/export/TestTracingSpanExporter';

/**
* VisibilityState has been removed from TypeScript 4.6.0+
* So just defining a simple replacement
*/
type WebVisibilityState = 'visible' | 'hidden';

const describeDocument =
typeof document === 'object' ? describe : describe.skip;

describeDocument('BatchSpanProcessor - web main context', () => {
let visibilityState: VisibilityState = 'visible';
let visibilityState: WebVisibilityState = 'visible';
let exporter: SpanExporter;
let processor: BatchSpanProcessor;
let forceFlushSpy: sinon.SinonStub;
Expand Down

0 comments on commit 708afd0

Please sign in to comment.