File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- import Temperature from '@/temprature '
1
+ import Temperature from '@/temperature '
2
2
import { mount } from '@vue/test-utils'
3
3
4
4
describe ( 'Computed Properties Tests' , ( ) => {
Original file line number Diff line number Diff line change @@ -18,27 +18,27 @@ export default {
18
18
19
19
computed: {
20
20
celsius () {
21
- if (this .type == ' celsius' )
22
- return this .degrees
21
+ if (this .type === ' celsius' )
22
+ return this .degrees ;
23
23
else
24
- return parseInt ((this .degrees - 32 ) * 0.556 )
24
+ return parseInt ((this .degrees - 32 ) * 0.556 );
25
25
},
26
26
27
27
fahrenheit () {
28
- if (this .type == ' fahrenheit' )
29
- return this .degrees
28
+ if (this .type === ' fahrenheit' )
29
+ return this .degrees ;
30
30
else
31
- return (this .degrees * 1.8 ) + 32
31
+ return (this .degrees * 1.8 ) + 32 ;
32
32
}
33
33
},
34
34
35
35
watch: {
36
36
temp: {
37
37
immediate: true ,
38
38
handler : function (val ) {
39
- if (! val) return
40
- this .degrees = parseInt (val)
41
- this .type = String (val).endsWith (' f' ) ? ' fahrenheit' : ' celsius'
39
+ if (! val) return ;
40
+ this .degrees = parseInt (val);
41
+ this .type = String (val).endsWith (' f' ) ? ' fahrenheit' : ' celsius' ;
42
42
}
43
43
}
44
44
}
You can’t perform that action at this time.
0 commit comments