Skip to content

Commit

Permalink
♻️ rename specHelper to testSetupBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaudan committed Mar 27, 2023
1 parent dfe8955 commit c647653
Show file tree
Hide file tree
Showing 26 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions packages/rum-core/src/boot/rumPublicApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { RelativeTime, TimeStamp, Context } from '@datadog/browser-core'
import { ONE_SECOND, getTimeStamp, display, DefaultPrivacyLevel } from '@datadog/browser-core'
import { cleanupSyntheticsWorkerValues, mockSyntheticsWorkerValues } from '../../../core/test/syntheticsWorkerValues'
import { initEventBridgeStub, deleteEventBridgeStub } from '../../../core/test/specHelper'
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import type { HybridInitConfiguration, RumInitConfiguration } from '../domain/configuration'
import { ActionType } from '../rawRumEvent.types'
import { noopRecorderApi } from '../../test/noopRecorderApi'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/boot/startRum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
import { createNewEvent, interceptRequests } from '../../../core/test/specHelper'
import type { RumSessionManagerMock } from '../../test/mockRumSessionManager'
import { createRumSessionManagerMock } from '../../test/mockRumSessionManager'
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import type { RumPerformanceNavigationTiming, RumPerformanceEntry } from '../browser/performanceCollection'
import type { LifeCycle } from '../domain/lifeCycle'
import { LifeCycleEventType } from '../domain/lifeCycle'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/browser/performanceCollection.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import { retrieveInitialDocumentResourceTiming, startPerformanceCollection } from './performanceCollection'

describe('rum initial document resource', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/assembly.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { RelativeTime } from '@datadog/browser-core'
import { ErrorSource, ONE_MINUTE, display } from '@datadog/browser-core'
import { createRumSessionManagerMock } from '../../test/mockRumSessionManager'
import { createRawRumEvent } from '../../test/fixtures'
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import type { RumEventDomainContext } from '../domainContext.types'
import type { RawRumActionEvent, RawRumErrorEvent, RawRumEvent } from '../rawRumEvent.types'
import { RumEventType } from '../rawRumEvent.types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime } from '@datadog/browser-core'
import { resetExperimentalFeatures, updateExperimentalFeatures, relativeToClocks } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import { LifeCycleEventType } from '../lifeCycle'
import type { ViewCreatedEvent, ViewEndedEvent } from '../rumEventsCollection/view/trackViews'
import type { FeatureFlagContexts } from './featureFlagContext'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime, Duration, ServerDuration } from '@datadog/browser-core'
import { relativeNow } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import type { ForegroundContexts } from './foregroundContexts'
import {
startForegroundContexts,
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/contexts/internalContext.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime } from '@datadog/browser-core'
import { createRumSessionManagerMock } from '../../../test/mockRumSessionManager'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import type { ActionContexts } from '../rumEventsCollection/action/actionCollection'
import type { RumSessionManager } from '../rumSessionManager'
import { startInternalContext } from './internalContext'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime } from '@datadog/browser-core'
import { resetExperimentalFeatures } from '@datadog/browser-core'
import type { TestSetupBuilder } from 'packages/rum-core/test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from 'packages/rum-core/test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import type { PageStateHistory } from './pageStateHistory'
import { resetPageStates, startPageStateHistory, addPageState, PageState } from './pageStateHistory'

Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/contexts/urlContexts.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime } from '@datadog/browser-core'
import { relativeToClocks } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import { LifeCycleEventType } from '../lifeCycle'
import type { ViewCreatedEvent, ViewEndedEvent } from '../rumEventsCollection/view/trackViews'
import type { UrlContexts } from './urlContexts'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/contexts/viewContexts.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime } from '@datadog/browser-core'
import { relativeToClocks, CLEAR_OLD_CONTEXTS_INTERVAL } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import { LifeCycleEventType } from '../lifeCycle'
import type { ViewCreatedEvent } from '../rumEventsCollection/view/trackViews'
import type { ViewContexts } from './viewContexts'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Duration, RelativeTime, ServerDuration, TimeStamp } from '@datadog/browser-core'
import { createNewEvent } from '../../../../../core/test/specHelper'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import { RumEventType, ActionType } from '../../../rawRumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
import { startActionCollection } from './actionCollection'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
relativeNow,
} from '@datadog/browser-core'
import { createNewEvent } from '../../../../../core/test/specHelper'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import { RumEventType, ActionType, FrustrationType } from '../../../rawRumEvent.types'
import type { RumEvent } from '../../../rumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RelativeTime, TimeStamp, ErrorWithCause } from '@datadog/browser-core'
import { ErrorHandling, ErrorSource } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type { RawRumErrorEvent } from '../../../rawRumEvent.types'
import { RumEventType } from '../../../rawRumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Duration, RelativeTime, ServerDuration } from '@datadog/browser-core'
import type { RumSessionManagerMock } from '../../../../test/mockRumSessionManager'
import { createRumSessionManagerMock } from '../../../../test/mockRumSessionManager'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type { RumPerformanceEntry, RumPerformanceLongTaskTiming } from '../../../browser/performanceCollection'
import { RumEventType } from '../../../rawRumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
} from '@datadog/browser-core'
import type { RumFetchResourceEventDomainContext } from '../../../domainContext.types'
import { createResourceEntry } from '../../../../test/fixtures'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type { RawRumResourceEvent } from '../../../rawRumEvent.types'
import { RumEventType } from '../../../rawRumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BuildContext } from '../../../../test/specHelper'
import type { BuildContext } from '../../../../test/testSetupBuilder'
import { LifeCycleEventType } from '../../lifeCycle'
import type { ViewEvent, ViewOptions } from './trackViews'
import { trackViews } from './trackViews'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Duration, RelativeTime } from '@datadog/browser-core'
import { DOM_EVENT } from '@datadog/browser-core'
import { createNewEvent, restorePageVisibility, setPageVisibility } from '../../../../../core/test/specHelper'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type {
RumFirstInputTiming,
RumLargestContentfulPaintTiming,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Context, RelativeTime, Duration } from '@datadog/browser-core'
import { addDuration, relativeNow } from '@datadog/browser-core'
import type { RumEvent } from '../../../rumEvent.types'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type { RumPerformanceNavigationTiming } from '../../../browser/performanceCollection'
import { FrustrationType, RumEventType } from '../../../rawRumEvent.types'
import type { LifeCycle } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
relativeNow,
resetExperimentalFeatures,
} from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type {
RumLargestContentfulPaintTiming,
RumPerformanceNavigationTiming,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Duration, RelativeTime, ServerDuration, TimeStamp } from '@datadog/browser-core'
import type { RecorderApi } from '../../../boot/rumPublicApi'
import type { TestSetupBuilder } from '../../../../test/specHelper'
import { setup } from '../../../../test/specHelper'
import type { TestSetupBuilder } from '../../../../test/testSetupBuilder'
import { setup } from '../../../../test/testSetupBuilder'
import type { RawRumViewEvent } from '../../../rawRumEvent.types'
import { RumEventType, ViewLoadingType } from '../../../rawRumEvent.types'
import { LifeCycleEventType } from '../../lifeCycle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BatchFlushEvent, Context, ContextManager, TelemetryEvent } from '@datadog/browser-core'
import { resetExperimentalFeatures, TelemetryService, startTelemetry, Observable } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import { RumEventType } from '../rawRumEvent.types'
import type { RumEvent } from '../rumEvent.types'
import type { FeatureFlagContexts } from './contexts/featureFlagContext'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/tracing/tracer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { display, isIE, objectEntries } from '@datadog/browser-core'
import type { TestSetupBuilder } from '../../../test/specHelper'
import { setup } from '../../../test/specHelper'
import type { TestSetupBuilder } from '../../../test/testSetupBuilder'
import { setup } from '../../../test/testSetupBuilder'
import type { RumSessionManagerMock } from '../../../test/mockRumSessionManager'
import { createRumSessionManagerMock } from '../../../test/mockRumSessionManager'
import type { RumFetchResolveContext, RumFetchStartContext, RumXhrStartContext } from '../requestCollection'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum-core/src/domain/waitPageActivityEnd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { RelativeTime, Subscription } from '@datadog/browser-core'
import { Observable, ONE_SECOND, getTimeStamp } from '@datadog/browser-core'
import type { Clock } from '@datadog/browser-core/test/specHelper'
import { mockClock } from '@datadog/browser-core/test/specHelper'
import type { TestSetupBuilder } from '../../test/specHelper'
import { setup } from '../../test/specHelper'
import type { TestSetupBuilder } from '../../test/testSetupBuilder'
import { setup } from '../../test/testSetupBuilder'
import type { RumPerformanceNavigationTiming, RumPerformanceResourceTiming } from '../browser/performanceCollection'
import { LifeCycleEventType } from './lifeCycle'
import type { RequestCompleteEvent, RequestStartEvent } from './requestCollection'
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/rum/src/boot/recorderApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { LifeCycleEventType } from '@datadog/browser-rum-core'
import { createNewEvent, deleteEventBridgeStub, initEventBridgeStub } from '../../../core/test/specHelper'
import type { RumSessionManagerMock } from '../../../rum-core/test/mockRumSessionManager'
import { createRumSessionManagerMock } from '../../../rum-core/test/mockRumSessionManager'
import type { TestSetupBuilder } from '../../../rum-core/test/specHelper'
import { setup } from '../../../rum-core/test/specHelper'
import type { TestSetupBuilder } from '../../../rum-core/test/testSetupBuilder'
import { setup } from '../../../rum-core/test/testSetupBuilder'
import type { DeflateWorker, startDeflateWorker } from '../domain/segmentCollection'
import type { StartRecording } from './recorderApi'
import { makeRecorderApi } from './recorderApi'
Expand Down
4 changes: 2 additions & 2 deletions packages/rum/src/boot/startRecording.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type { RumSessionManagerMock } from '../../../rum-core/test/mockRumSessio
import { createRumSessionManagerMock } from '../../../rum-core/test/mockRumSessionManager'
import { createNewEvent, mockClock } from '../../../core/test/specHelper'

import type { TestSetupBuilder } from '../../../rum-core/test/specHelper'
import { setup } from '../../../rum-core/test/specHelper'
import type { TestSetupBuilder } from '../../../rum-core/test/testSetupBuilder'
import { setup } from '../../../rum-core/test/testSetupBuilder'
import { recordsPerFullSnapshot } from '../../test/utils'
import { setSegmentBytesLimit, startDeflateWorker } from '../domain/segmentCollection'

Expand Down

0 comments on commit c647653

Please sign in to comment.