File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/app/modules/time-entries/pages Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -670,14 +670,22 @@ describe('TimeEntriesComponent', () => {
670670 } ) ;
671671
672672 it ( 'checkIfDataSourceIsLoading should be false when dataSource.isLoading is false' , ( ) => {
673- const expectedValue = false ;
673+ expect ( component . checkIfDataSourceIsLoading ( state . timeEntriesDataSource ) ) . toBeFalse ( ) ;
674+ } ) ;
674675
675- expect ( component . checkIfDataSourceIsLoading ( state . timeEntriesDataSource ) ) . toEqual ( expectedValue ) ;
676+ it ( 'checkIfDataSourceIsLoading should be true when dataSource.isLoading is true' , ( ) => {
677+ state . timeEntriesDataSource . isLoading = true ;
678+
679+ expect ( component . checkIfDataSourceIsLoading ( state . timeEntriesDataSource ) ) . toBeTrue ( ) ;
676680 } ) ;
677681
678- it ( 'checkIfDataSourceIsEmpty should be false when dataSource.data.length is not zero' , ( ) => {
679- const expectedValue = false ;
682+ it ( 'checkIfDataSourceIsEmpty should be false when dataSource.data.length is not empty' , ( ) => {
683+ expect ( component . checkIfDataSourceIsEmpty ( state . timeEntriesDataSource ) ) . toBeFalse ( ) ;
684+ } ) ;
685+
686+ it ( 'checkIfDataSourceIsEmpty should be true when dataSource.data.length is empty' , ( ) => {
687+ state . timeEntriesDataSource . data = [ ] ;
680688
681- expect ( component . checkIfDataSourceIsEmpty ( state . timeEntriesDataSource ) ) . toEqual ( expectedValue ) ;
689+ expect ( component . checkIfDataSourceIsEmpty ( state . timeEntriesDataSource ) ) . toBeTrue ( ) ;
682690 } ) ;
683691} ) ;
You can’t perform that action at this time.
0 commit comments