@@ -3878,4 +3878,66 @@ describe('Config', () => {
38783878 expect ( value ) . toBe ( false ) ;
38793879 } ) ;
38803880 } ) ;
3881+
3882+ describe ( 'stickyHeader' , ( ) => {
3883+ it ( 'Should return TRUE when the configuration value is TRUE' , ( ) => {
3884+ // Setup
3885+ workspaceConfiguration . get . mockReturnValueOnce ( true ) ;
3886+
3887+ // Run
3888+ const value = config . stickyHeader ;
3889+
3890+ // Assert
3891+ expect ( workspaceConfiguration . get ) . toBeCalledWith ( 'stickyHeader' , true ) ;
3892+ expect ( value ) . toBe ( true ) ;
3893+ } ) ;
3894+
3895+ it ( 'Should return FALSE when the configuration value is FALSE' , ( ) => {
3896+ // Setup
3897+ workspaceConfiguration . get . mockReturnValueOnce ( false ) ;
3898+
3899+ // Run
3900+ const value = config . stickyHeader ;
3901+
3902+ // Assert
3903+ expect ( workspaceConfiguration . get ) . toBeCalledWith ( 'stickyHeader' , true ) ;
3904+ expect ( value ) . toBe ( false ) ;
3905+ } ) ;
3906+
3907+ it ( 'Should return TRUE when the configuration value is truthy' , ( ) => {
3908+ // Setup
3909+ workspaceConfiguration . get . mockReturnValueOnce ( 5 ) ;
3910+
3911+ // Run
3912+ const value = config . stickyHeader ;
3913+
3914+ // Assert
3915+ expect ( workspaceConfiguration . get ) . toBeCalledWith ( 'stickyHeader' , true ) ;
3916+ expect ( value ) . toBe ( true ) ;
3917+ } ) ;
3918+
3919+ it ( 'Should return FALSE when the configuration value is falsy' , ( ) => {
3920+ // Setup
3921+ workspaceConfiguration . get . mockReturnValueOnce ( 0 ) ;
3922+
3923+ // Run
3924+ const value = config . stickyHeader ;
3925+
3926+ // Assert
3927+ expect ( workspaceConfiguration . get ) . toBeCalledWith ( 'stickyHeader' , true ) ;
3928+ expect ( value ) . toBe ( false ) ;
3929+ } ) ;
3930+
3931+ it ( 'Should return the default value (TRUE) when the configuration value is not set' , ( ) => {
3932+ // Setup
3933+ workspaceConfiguration . get . mockImplementationOnce ( ( _ , defaultValue ) => defaultValue ) ;
3934+
3935+ // Run
3936+ const value = config . stickyHeader ;
3937+
3938+ // Assert
3939+ expect ( workspaceConfiguration . get ) . toBeCalledWith ( 'stickyHeader' , true ) ;
3940+ expect ( value ) . toBe ( true ) ;
3941+ } ) ;
3942+ } ) ;
38813943} ) ;
0 commit comments