Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump LogRocket version & Discuss re-enabling tests #2532

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@segment/actions-core": "^3.139.0",
"@segment/browser-destination-runtime": "^1.68.0",
"logrocket": "^3.0.1"
"logrocket": "^9.0.0"
},
"peerDependencies": {
"@segment/analytics-next": ">=1.55.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
/*
import { Analytics, Context } from '@segment/analytics-next'
import plugins, { destination } from '../index'
import { mockWorkerAndXMLHttpRequest, subscriptions } from '../test_utilities'
import Logrocket from 'logrocket'
*/
//jest.mock('logrocket')

//const appID = 'log/rocket'
jest.mock('logrocket')

const appID = 'log/rocket'

describe('Logrocket', () => {
//beforeAll(mockWorkerAndXMLHttpRequest)
//afterAll(jest.restoreAllMocks)
beforeAll(mockWorkerAndXMLHttpRequest)
afterAll(jest.restoreAllMocks)

test('can load', async () => {
/*
const [event] = await plugins({
appID,
networkSanitization: false,
Expand All @@ -29,11 +27,8 @@ describe('Logrocket', () => {
expect(Logrocket.init).toHaveBeenCalled()

expect(window._LRLogger).toBeDefined()
*/
expect(true)
})

/*
test('supplies the input sanitization parameter', async () => {
const [event] = await plugins({
appID,
Expand Down Expand Up @@ -107,6 +102,4 @@ describe('Logrocket', () => {
expect(sanitizedResult).toEqual(mockRequest)
})
})

*/
})
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
/*
import { Analytics, Context } from '@segment/analytics-next'
import plugins from '../../index'
import LogRocket from 'logrocket'
import { identifySubscription, mockWorkerAndXMLHttpRequest } from '../../test_utilities'
*/

describe('Logrocket.identify', () => {
/*
const settings = { appID: 'log/rocket' }

beforeAll(mockWorkerAndXMLHttpRequest)
Expand All @@ -15,7 +12,6 @@ describe('Logrocket.identify', () => {
const traits = {
goodbye: 'moon'
}


it('should send user ID and traits to logrocket', async () => {
const [identify] = await plugins({ ...settings, subscriptions: [identifySubscription] })
Expand All @@ -35,9 +31,8 @@ describe('Logrocket.identify', () => {

expect(identifySpy).toHaveBeenCalledWith(userId, traits)
})
*/

it("shouldn't send an ID if the user is anonymous", async () => {
/*
const [identify] = await plugins({ appID: 'log/rocket', subscriptions: [identifySubscription] })

await identify.load(Context.system(), {} as Analytics)
Expand All @@ -51,7 +46,5 @@ describe('Logrocket.identify', () => {
)

expect(identifySpy).toHaveBeenCalledWith(traits)
*/
expect(true)
})
})
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
import { Analytics, Context } from '@segment/analytics-next'
import plugins from '../../index'
import LogRocket from 'logrocket'
import { mockWorkerAndXMLHttpRequest, trackSubscription } from '../../test_utilities'
*/

describe('Logrocket.track', () => {
//beforeAll(mockWorkerAndXMLHttpRequest)
//afterAll(jest.restoreAllMocks)
beforeAll(mockWorkerAndXMLHttpRequest)
afterAll(jest.restoreAllMocks)
it('sends track events to logrocket', async () => {
/*
const [event] = await plugins({ appID: 'log/rocket', subscriptions: [trackSubscription] })

await event.load(Context.system(), {} as Analytics)
Expand All @@ -29,7 +26,5 @@ describe('Logrocket.track', () => {
)

expect(trackSpy).toHaveBeenCalledWith(name, properties)
*/
expect(true)
})
})
2 changes: 1 addition & 1 deletion packages/browser-destinations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"size-limit": [
{
"path": "dist/web/*/*.js",
"limit": "200 KB"
"limit": "210 KB"
}
]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12268,10 +12268,10 @@ loglevel@^1.6.0:
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.1.tgz#5c621f83d5b48c54ae93b6156353f555963377b4"
integrity sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==

logrocket@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/logrocket/-/logrocket-3.0.1.tgz#c746e8df3d5fee999b152975e51db1908357a6f0"
integrity sha512-jOWG+jEzobKVxGytzZ+4KGm2kiMQMRTHab2uDWQyVZcHfEF38BlCH1yjQVY4LCmuQUwZitP9biMzJZnyUQ0dtQ==
logrocket@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/logrocket/-/logrocket-9.0.0.tgz#bbe4c116f9859c9323a71245417521c4f11d4610"
integrity sha512-/nYoKA4W8nr3YETPyOin9oiFFzwGDv8Lh02DG8ZnS9coKBYwrEG+dE2OqpOotVbs4zJWjCCPaqhR/HAMi+O3yA==

lower-case@^2.0.2:
version "2.0.2"
Expand Down
Loading