Skip to content

Commit f2fec21

Browse files
✅ Fix usage of non-existent configuration options in remoteConfiguration.spec.ts (#3576)
1 parent 839f58a commit f2fec21

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/rum-core/src/domain/configuration/remoteConfiguration.spec.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { interceptRequests } from '@datadog/browser-core/test'
33
import type { RumInitConfiguration } from './configuration'
44
import { applyRemoteConfiguration, buildEndpoint, fetchRemoteConfiguration } from './remoteConfiguration'
55

6-
const DEFAULT_INIT_CONFIGURATION = {
6+
const DEFAULT_INIT_CONFIGURATION: RumInitConfiguration = {
77
clientToken: 'xxx',
88
applicationId: 'xxx',
9-
samplingRate: 100,
10-
sessionReplaySamplingRate: 100,
9+
sessionReplaySampleRate: 100,
1110
defaultPrivacyLevel: DefaultPrivacyLevel.MASK,
12-
} as RumInitConfiguration
11+
}
1312

1413
describe('remoteConfiguration', () => {
1514
let displayErrorSpy: jasmine.Spy<typeof display.error>
@@ -55,10 +54,10 @@ describe('remoteConfiguration', () => {
5554
})
5655

5756
describe('applyRemoteConfiguration', () => {
58-
it('should override the iniConfiguration options with the ones from the remote configuration', () => {
59-
const remoteConfiguration = {
60-
samplingRate: 1,
61-
sessionReplaySamplingRate: 1,
57+
it('should override the initConfiguration options with the ones from the remote configuration', () => {
58+
const remoteConfiguration: Partial<RumInitConfiguration> = {
59+
sessionSampleRate: 1,
60+
sessionReplaySampleRate: 1,
6261
defaultPrivacyLevel: DefaultPrivacyLevel.ALLOW,
6362
}
6463
expect(applyRemoteConfiguration(DEFAULT_INIT_CONFIGURATION, remoteConfiguration)).toEqual(

0 commit comments

Comments
 (0)