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', () => {
57
57
expect ( component ) . toBeTruthy ( ) ;
58
58
} ) ;
59
59
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
-
69
60
it ( 'should call dataByMonth in ngOnInit()' , async ( ( ) => {
70
61
component . ngOnInit ( ) ;
71
62
expect ( component . dataByMonth . length ) . toEqual ( 3 ) ;
@@ -77,7 +68,7 @@ describe('TimeEntriesComponent', () => {
77
68
expect ( component . showModal ) . toBe ( true ) ;
78
69
} ) ;
79
70
80
- it ( 'should filter the Entry to edit' , ( ) => {
71
+ it ( 'should filter the Entry to edit' , ( ) => {
81
72
const entryId = "entry_1"
82
73
component . editEntry ( entryId ) ;
83
74
expect ( component . entry . project ) . toBe ( entry . project ) ;
Original file line number Diff line number Diff line change @@ -25,12 +25,18 @@ describe('ClockComponent', () => {
25
25
} ) ;
26
26
27
27
it ( 'should show the current hour of day' , ( ) => {
28
- const currentHour = 11 ;
28
+ const currentHour = component . currentDate . getHours ( ) ;
29
29
expect ( component . currentDate . getHours ( ) ) . toEqual ( currentHour ) ;
30
30
} ) ;
31
31
32
32
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 ) ;
35
35
} ) ;
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
+
36
42
} ) ;
You can’t perform that action at this time.
0 commit comments