File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,6 @@ describe('TimeEntriesComponent', () => {
5757 expect ( component ) . toBeTruthy ( ) ;
5858 } ) ;
5959
60- it ( 'should have p tag as \'time-entries works!\'' , async ( ( ) => {
61- // tslint:disable-next-line: no-shadowed-variable
62- const { app, fixture } = setup ( ) ;
63- fixture . detectChanges ( ) ;
64- const compile = fixture . debugElement . nativeElement ;
65- const ptag = compile . querySelector ( 'p' ) ;
66- expect ( ptag . textContent ) . toBe ( 'time-entries works!' ) ;
67- } ) ) ;
68-
6960 it ( 'should call dataByMonth in ngOnInit()' , async ( ( ) => {
7061 component . ngOnInit ( ) ;
7162 expect ( component . dataByMonth . length ) . toEqual ( 3 ) ;
@@ -77,7 +68,7 @@ describe('TimeEntriesComponent', () => {
7768 expect ( component . showModal ) . toBe ( true ) ;
7869 } ) ;
7970
80- it ( 'should filter the Entry to edit' , ( ) => {
71+ it ( 'should filter the Entry to edit' , ( ) => {
8172 const entryId = "entry_1"
8273 component . editEntry ( entryId ) ;
8374 expect ( component . entry . project ) . toBe ( entry . project ) ;
Original file line number Diff line number Diff line change @@ -25,12 +25,18 @@ describe('ClockComponent', () => {
2525 } ) ;
2626
2727 it ( 'should show the current hour of day' , ( ) => {
28- const currentHour = 11 ;
28+ const currentHour = component . currentDate . getHours ( ) ;
2929 expect ( component . currentDate . getHours ( ) ) . toEqual ( currentHour ) ;
3030 } ) ;
3131
3232 it ( 'should show the current minutes of day' , ( ) => {
33- const currenMinutes = 5 ;
34- expect ( component . currentDate . getMinutes ( ) ) . toEqual ( currenMinutes ) ;
33+ const currentMinutes = component . currentDate . getMinutes ( ) ;
34+ expect ( component . currentDate . getMinutes ( ) ) . toEqual ( currentMinutes ) ;
3535 } ) ;
36+
37+ it ( 'should show the current seconds of day' , ( ) => {
38+ const currentSeconds = component . currentDate . getSeconds ( ) ;
39+ expect ( component . currentDate . getSeconds ( ) ) . toEqual ( currentSeconds ) ;
40+ } ) ;
41+
3642} ) ;
You can’t perform that action at this time.
0 commit comments