Skip to content

Commit 37cd27a

Browse files
committed
rename and move files into core
1 parent 4401356 commit 37cd27a

File tree

10 files changed

+19
-15
lines changed

10 files changed

+19
-15
lines changed

src/__tests__/analytics-pre-init.integration.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { AnalyticsBrowser } from '..'
22
import unfetch from 'unfetch'
33
import { mocked } from 'ts-jest/utils'
44
import { Analytics } from '../analytics'
5-
import { AnalyticsBuffered } from '../analytics-pre-init'
5+
import { AnalyticsBuffered } from '../core/buffer'
66
import { Context } from '../core/context'
7-
import * as Factory from './test-helpers/factories'
8-
import { sleep } from './test-helpers/sleep'
7+
import * as Factory from '../test-helpers/factories'
8+
import { sleep } from '../test-helpers/sleep'
99
import { setGlobalCDNUrl } from '../lib/parse-cdn'
1010

1111
jest.mock('unfetch')

src/__tests__/cdn.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AnalyticsBrowser } from '..'
22
import { mocked } from 'ts-jest/utils'
33
import unfetch from 'unfetch'
4-
import { createSuccess } from './test-helpers/factories'
4+
import { createSuccess } from '../test-helpers/factories'
55
import { setGlobalCDNUrl } from '../lib/parse-cdn'
66

77
jest.mock('unfetch', () => {

src/__tests__/typedef-tests/analytics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Analytics } from '@/analytics'
2-
import { AnalyticsBuffered } from '@/analytics-pre-init'
2+
import { AnalyticsBuffered } from '@/core/buffer'
33
import { Context } from '@/core/context'
4-
import { AnalyticsBrowser } from '../../browser'
5-
import { assertNotAny, assertIs } from '../test-helpers/type-assertions'
4+
import { AnalyticsBrowser } from '@/browser'
5+
import { assertNotAny, assertIs } from '@/test-helpers/type-assertions'
66

77
/**
88
* These are general typescript definition tests;

src/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
flushSetAnonymousID,
2222
flushOn,
2323
getSnippetWindowBuffer,
24-
} from './analytics-pre-init'
24+
} from './core/buffer'
2525

2626
export interface LegacyIntegrationConfiguration {
2727
/* @deprecated - This does not indicate browser types anymore */

src/__tests__/analytics-pre-init.test.ts renamed to src/core/buffer/__tests__/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
PreInitMethodCall,
55
flushAnalyticsCallsInNewTask,
66
PreInitMethodCallBuffer,
7-
} from '../analytics-pre-init'
8-
import { Analytics } from '../analytics'
9-
import { Context } from '../core/context'
10-
import { sleep } from './test-helpers/sleep'
7+
} from '..'
8+
import { Analytics } from '../../../analytics'
9+
import { Context } from '../../context'
10+
import { sleep } from '@/test-helpers/sleep'
1111

1212
describe('PreInitMethodCallBuffer', () => {
1313
describe('push', () => {

src/analytics-pre-init.ts renamed to src/core/buffer/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Analytics } from './analytics'
2-
import { Context } from './core/context'
3-
import { isThenable } from './lib/is-thenable'
1+
import { Analytics } from '../../analytics'
2+
import { Context } from '../context'
3+
import { isThenable } from '../../lib/is-thenable'
44

55
/**
66
* The names of any Analytics instance methods that can be called pre-initialization.

src/lib/priority-queue/__tests__/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ describe('RetryQueue', () => {
6666
})
6767

6868
describe('backoffs', () => {
69+
afterEach(() => {
70+
jest.clearAllTimers()
71+
})
72+
6973
it('accepts new work', () => {
7074
const queue = new PriorityQueue<Item>(10, [])
7175

File renamed without changes.

0 commit comments

Comments
 (0)