Skip to content

Commit 1b56ba5

Browse files
committed
test: extend animation parser tests
1 parent 7903b8a commit 1b56ba5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tests/unit/circle/circle-animation.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const animationDurationTests = (container, circleClass, prefix = "circle | ") =>
6969
const animationDelayTests = (container, circleClass, prefix = "circle | ") => {
7070
it(`${prefix} awaits default @400ms on initialization`, async () => {
7171
const wrapper = localFactory({}, container);
72-
await wait(390);
72+
await wait(350);
7373
expect(wrapper.vm.isInitialized).to.be.false;
7474
});
7575

tests/unit/container.spec.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,18 @@ describe("[ EllipseProgressContainer.vue ]", () => {
304304
expect(delay).to.equal(2000);
305305
});
306306
it("applies default values for duration and delay if invalid values provided", () => {
307-
const { duration, delay } = animationParser("loop 20%0 sdf");
308-
expect(duration).to.not.equal(animationParser(props.animation.default).duration);
307+
const { duration, delay } = animationParser("loop f20%0 sdf");
308+
expect(duration).to.equal(animationParser(props.animation.default).duration);
309309
expect(delay).to.equal(animationParser(props.animation.default).delay);
310310
});
311+
it("applies 0 as duration", () => {
312+
const { duration } = animationParser("loop 0");
313+
expect(duration).to.equal(0);
314+
});
315+
it("applies 0 as delay", () => {
316+
const { delay } = animationParser("loop 0 0");
317+
expect(delay).to.equal(0);
318+
});
311319
});
312320
describe("#dash parser", () => {
313321
it("returns the value as without strict mode", () => {

0 commit comments

Comments
 (0)