@@ -3,13 +3,12 @@ import { interceptRequests } from '@datadog/browser-core/test'
3
3
import type { RumInitConfiguration } from './configuration'
4
4
import { applyRemoteConfiguration , buildEndpoint , fetchRemoteConfiguration } from './remoteConfiguration'
5
5
6
- const DEFAULT_INIT_CONFIGURATION = {
6
+ const DEFAULT_INIT_CONFIGURATION : RumInitConfiguration = {
7
7
clientToken : 'xxx' ,
8
8
applicationId : 'xxx' ,
9
- samplingRate : 100 ,
10
- sessionReplaySamplingRate : 100 ,
9
+ sessionReplaySampleRate : 100 ,
11
10
defaultPrivacyLevel : DefaultPrivacyLevel . MASK ,
12
- } as RumInitConfiguration
11
+ }
13
12
14
13
describe ( 'remoteConfiguration' , ( ) => {
15
14
let displayErrorSpy : jasmine . Spy < typeof display . error >
@@ -55,10 +54,10 @@ describe('remoteConfiguration', () => {
55
54
} )
56
55
57
56
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 ,
62
61
defaultPrivacyLevel : DefaultPrivacyLevel . ALLOW ,
63
62
}
64
63
expect ( applyRemoteConfiguration ( DEFAULT_INIT_CONFIGURATION , remoteConfiguration ) ) . toEqual (
0 commit comments