11/* eslint-disable no-console */
2- import Configuration from '../../src/configuration/Configuration' ;
2+ import ConfigurationImpl from '../../src/configuration/Configuration' ;
33
44describe ( 'Configuration' , ( ) => {
55 beforeEach ( ( ) => {
@@ -8,7 +8,7 @@ describe('Configuration', () => {
88 } ) ;
99
1010 it ( 'has valid default values' , ( ) => {
11- const config = new Configuration ( ) ;
11+ const config = new ConfigurationImpl ( ) ;
1212
1313 expect ( config ) . toMatchObject ( {
1414 allAttributesPrivate : false ,
@@ -37,21 +37,21 @@ describe('Configuration', () => {
3737 } ) ;
3838
3939 it ( 'allows specifying valid wrapperName' , ( ) => {
40- const config = new Configuration ( { wrapperName : 'test' } ) ;
40+ const config = new ConfigurationImpl ( { wrapperName : 'test' } ) ;
4141 expect ( config ) . toMatchObject ( { wrapperName : 'test' } ) ;
4242 } ) ;
4343
4444 it ( 'warns and ignored invalid keys' , ( ) => {
4545 // @ts -ignore
46- const config = new Configuration ( { baseballUri : 1 } ) ;
46+ const config = new ConfigurationImpl ( { baseballUri : 1 } ) ;
4747
4848 expect ( config . baseballUri ) . toBeUndefined ( ) ;
4949 expect ( console . error ) . toHaveBeenCalledWith ( expect . stringContaining ( 'unknown config option' ) ) ;
5050 } ) ;
5151
5252 it ( 'converts boolean types' , ( ) => {
5353 // @ts -ignore
54- const config = new Configuration ( { sendEvents : 0 } ) ;
54+ const config = new ConfigurationImpl ( { sendEvents : 0 } ) ;
5555
5656 expect ( config . sendEvents ) . toBeFalsy ( ) ;
5757 expect ( console . error ) . toHaveBeenCalledWith (
@@ -61,7 +61,7 @@ describe('Configuration', () => {
6161
6262 it ( 'ignores wrong type for number and logs appropriately' , ( ) => {
6363 // @ts -ignore
64- const config = new Configuration ( { capacity : true } ) ;
64+ const config = new ConfigurationImpl ( { capacity : true } ) ;
6565
6666 expect ( config . capacity ) . toEqual ( 100 ) ;
6767 expect ( console . error ) . toHaveBeenCalledWith (
@@ -70,7 +70,7 @@ describe('Configuration', () => {
7070 } ) ;
7171
7272 it ( 'enforces minimum flushInterval' , ( ) => {
73- const config = new Configuration ( { flushInterval : 1 } ) ;
73+ const config = new ConfigurationImpl ( { flushInterval : 1 } ) ;
7474
7575 expect ( config . flushInterval ) . toEqual ( 2 ) ;
7676 expect ( console . error ) . toHaveBeenNthCalledWith (
@@ -80,14 +80,14 @@ describe('Configuration', () => {
8080 } ) ;
8181
8282 it ( 'allows setting a valid maxCachedContexts' , ( ) => {
83- const config = new Configuration ( { maxCachedContexts : 3 } ) ;
83+ const config = new ConfigurationImpl ( { maxCachedContexts : 3 } ) ;
8484
8585 expect ( config . maxCachedContexts ) . toBeDefined ( ) ;
8686 expect ( console . error ) . not . toHaveBeenCalled ( ) ;
8787 } ) ;
8888
8989 it ( 'enforces minimum maxCachedContext' , ( ) => {
90- const config = new Configuration ( { maxCachedContexts : - 1 } ) ;
90+ const config = new ConfigurationImpl ( { maxCachedContexts : - 1 } ) ;
9191
9292 expect ( config . maxCachedContexts ) . toBeDefined ( ) ;
9393 expect ( console . error ) . toHaveBeenNthCalledWith (
@@ -103,15 +103,15 @@ describe('Configuration', () => {
103103 [ 'kebab-case-works' ] ,
104104 [ 'snake_case_works' ] ,
105105 ] ) ( 'allow setting valid payload filter keys' , ( filter ) => {
106- const config = new Configuration ( { payloadFilterKey : filter } ) ;
106+ const config = new ConfigurationImpl ( { payloadFilterKey : filter } ) ;
107107 expect ( config . payloadFilterKey ) . toEqual ( filter ) ;
108108 expect ( console . error ) . toHaveBeenCalledTimes ( 0 ) ;
109109 } ) ;
110110
111111 it . each ( [ [ 'invalid-@-filter' ] , [ '_invalid-filter' ] , [ '-invalid-filter' ] ] ) (
112112 'ignores invalid filters and logs a warning' ,
113113 ( filter ) => {
114- const config = new Configuration ( { payloadFilterKey : filter } ) ;
114+ const config = new ConfigurationImpl ( { payloadFilterKey : filter } ) ;
115115 expect ( config . payloadFilterKey ) . toBeUndefined ( ) ;
116116 expect ( console . error ) . toHaveBeenNthCalledWith (
117117 1 ,
0 commit comments