@@ -2,7 +2,7 @@ import { expect } from "chai";
2
2
import Circle from "@/components/Circle/Circle.vue" ;
3
3
import HalfCircle from "@/components/Circle/HalfCircle.vue" ;
4
4
import VueEllipseProgress from "@/components/VueEllipseProgress.vue" ;
5
- import { dotParser , calcThickness } from "@/components/optionsParser" ;
5
+ import { dotParser , calcThickness , animationParser } from "@/components/optionsParser" ;
6
6
import { factory , setCircleProps } from "@/../tests/helper" ;
7
7
8
8
const localFactory = ( props , container = Circle ) => factory ( { container, props } ) ;
@@ -20,7 +20,7 @@ describe("[ CircleProgress.vue | HalfCircleProgress.vue ]", () => {
20
20
progress,
21
21
thickness,
22
22
emptyThickness : thickness ,
23
- animation : "default 0 0" ,
23
+ animation : animationParser ( "default 0 0" ) ,
24
24
} ) ;
25
25
it ( "calculates the progress circle stroke offset correctly" , ( ) => {
26
26
const radius = size / 2 - thickness / 2 ;
@@ -31,7 +31,7 @@ describe("[ CircleProgress.vue | HalfCircleProgress.vue ]", () => {
31
31
} ) ;
32
32
it ( "calculates the negative progress circle stroke offset correctly" , async ( ) => {
33
33
progress = - 50 ;
34
- await wrapper . setProps ( { options : { ... wrapper . props ( ) . options , progress } } ) ;
34
+ await setCircleProps ( wrapper , { progress } ) ;
35
35
const radius = size / 2 - thickness / 2 ;
36
36
const circumference = radius * 2 * Math . PI ;
37
37
const expectedOffset = circumference - ( progress / 100 ) * circumference ;
@@ -48,8 +48,7 @@ describe("[ CircleProgress.vue | HalfCircleProgress.vue ]", () => {
48
48
} ) ;
49
49
it ( "lets progress circle visible for -1 < progress < 1" , async ( ) => {
50
50
progress = 0 ;
51
- await wrapper . setProps ( { options : { ...wrapper . props ( ) . options , half : true } } ) ;
52
- await setCircleProps ( wrapper , { half : true } ) ;
51
+ await setCircleProps ( wrapper , { progress, half : true } ) ;
53
52
const radius = size / 2 - thickness / 2 ;
54
53
const circumference = radius * 2 * Math . PI ;
55
54
0 commit comments