Improve test cases from components and utils

This commit is contained in:
RcleydsonR
2023-02-06 14:01:03 -03:00
parent c5b16559ff
commit 600510c719
7 changed files with 109 additions and 11 deletions

View File

@@ -0,0 +1,12 @@
import { it, expect } from "vitest";
import { decimalCount } from "../decimalCount";
describe("decimalCount function test", () => {
it("decimalCount should return length 1 of decimal", () => {
expect(decimalCount("4.1")).toEqual(1);
});
it("decimalCount should return length 0 because no decimal found", () => {
expect(decimalCount("5")).toEqual(0);
});
});