File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 44 --> <span v-if =" !blink || seconds % 2 === 0" >:</span ><!--
55 --> <span v-else >  ; </span ><!--
66 --> <span class =" clock__minutes" >{{ minutes }}</span ><!--
7- --> <span v-if =" !blink || ( seconds % 2 === 0 && displaySeconds )" >:</span ><!--
7+ --> <span v-if =" displaySeconds && ( !blink || seconds % 2 === 0)" >:</span ><!--
88 --> <span v-else-if =" displaySeconds" >  ; </span ><!--
99 --> <span v-if =" displaySeconds" class =" clock__seconds" >{{ seconds }}</span >
1010 </time >
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ describe('Clock.vue', () => {
134134 const wrapper = mount ( Clock , { propsData : { blink : true } } ) ;
135135 expect ( wrapper . text ( ) ) . to . not . contain ( ':' ) ;
136136 } ) ;
137-
137+
138138 it ( 'Calls clear input with vm.ticker when component is destroyed' , ( ) => {
139139 const stub = sinon . stub ( ) ;
140140 window . clearInterval = stub ;
@@ -143,4 +143,9 @@ describe('Clock.vue', () => {
143143 wrapper . destroy ( ) ;
144144 expect ( stub . args [ 0 ] [ 0 ] ) . to . equal ( ticker ) ;
145145 } ) ;
146+
147+ it ( 'should not display second colon by default' , ( ) => {
148+ const wrapper = mount ( Clock ) ;
149+ expect ( ( wrapper . text ( ) . match ( / : / g) || [ ] ) . length ) . to . equal ( 1 ) ;
150+ } ) ;
146151} ) ;
You can’t perform that action at this time.
0 commit comments