Skip to content

Commit

Permalink
Move time provider util to utils folder
Browse files Browse the repository at this point in the history
  • Loading branch information
louiszawadzki committed Oct 11, 2023
1 parent 9da1672 commit e95d7fb
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/rum/DdRum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import type { GestureResponderEvent } from 'react-native';

import { InternalLog } from '../InternalLog';
import { SdkVerbosity } from '../SdkVerbosity';
import { TimeProvider } from '../TimeProvider';
import type { DdNativeRumType } from '../nativeModulesTypes';
import { bufferVoidNativeCall } from '../sdk/DatadogProvider/Buffer/bufferNativeCall';
import { DdSdk } from '../sdk/DdSdk';
import { TimeProvider } from '../utils/TimeProvider';

import type { ActionEventMapper } from './eventMappers/actionEventMapper';
import { generateActionEventMapper } from './eventMappers/actionEventMapper';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/rum/__tests__/DdRum.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { ErrorEventMapper } from '../eventMappers/errorEventMapper';
import type { ResourceEventMapper } from '../eventMappers/resourceEventMapper';
import { ErrorSource, PropagatorType, RumActionType } from '../types';

jest.mock('../../TimeProvider', () => {
jest.mock('../../utils/TimeProvider', () => {
return {
TimeProvider: jest.fn().mockImplementation(() => {
return { now: jest.fn().mockReturnValue(456) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2016-Present Datadog, Inc.
*/

import Timer from '../../../../../Timer';
import Timer from '../../../../../utils/Timer';
import { getTracingHeaders } from '../../distributedTracing/distributedTracingHeaders';
import type { DdRumResourceTracingAttributes } from '../../distributedTracing/distributedTracing';
import { getTracingAttributes } from '../../distributedTracing/distributedTracing';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { NativeModules } from 'react-native';

import { InitializationMode } from '../../../DdSdkReactNativeConfiguration';
import { DdSdkReactNative } from '../../../DdSdkReactNative';
import { TimeProvider } from '../../../TimeProvider';
import { DdRum } from '../../../rum/DdRum';
import { RumActionType } from '../../../rum/types';
import { DdTrace } from '../../../trace/DdTrace';
import { TimeProvider } from '../../../utils/TimeProvider';
import { BufferSingleton } from '../Buffer/BufferSingleton';
import {
DatadogProvider,
Expand All @@ -24,7 +24,7 @@ import {
renderWithProvider
} from './__utils__/renderWithProvider';

jest.mock('../../../TimeProvider', () => {
jest.mock('../../../utils/TimeProvider', () => {
const now = jest.fn();
return {
TimeProvider: jest.fn().mockImplementation(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { NativeModules } from 'react-native';

import { InitializationMode } from '../../../DdSdkReactNativeConfiguration';
import { DdSdkReactNative } from '../../../DdSdkReactNative';
import { TimeProvider } from '../../../TimeProvider';
import { DdRumUserInteractionTracking } from '../../../rum/instrumentation/interactionTracking/DdRumUserInteractionTracking';
import { XMLHttpRequestMock } from '../../../rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock';
import { TimeProvider } from '../../../utils/TimeProvider';
import { BufferSingleton } from '../Buffer/BufferSingleton';
import {
DatadogProvider,
Expand All @@ -25,7 +25,7 @@ import {
renderWithProviderAndAnimation
} from './__utils__/renderWithProvider';

jest.mock('../../../TimeProvider', () => {
jest.mock('../../../utils/TimeProvider', () => {
const now = jest.fn();
return {
TimeProvider: jest.fn().mockImplementation(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/trace/DdTrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

import { InternalLog } from '../InternalLog';
import { SdkVerbosity } from '../SdkVerbosity';
import { TimeProvider } from '../TimeProvider';
import type { DdNativeTraceType } from '../nativeModulesTypes';
import {
bufferNativeCallReturningId,
bufferNativeCallWithId
} from '../sdk/DatadogProvider/Buffer/bufferNativeCall';
import type { DdTraceType } from '../types';
import { TimeProvider } from '../utils/TimeProvider';

const timeProvider = new TimeProvider();

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e95d7fb

Please sign in to comment.