feat: mask date of birth
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test } from "@jest/globals"
|
||||
|
||||
import { email, phone, text } from "./maskValue"
|
||||
import { all, email, phone, text } from "./maskValue"
|
||||
|
||||
describe("Mask value", () => {
|
||||
test("masks e-mails properly", () => {
|
||||
@@ -19,4 +19,9 @@ describe("Mask value", () => {
|
||||
expect(text("test")).toBe("t***")
|
||||
expect(text("test.with.dot")).toBe("t************")
|
||||
})
|
||||
|
||||
test("masks whole string properly", () => {
|
||||
expect(all("test")).toBe("****")
|
||||
expect(all("123jknasd@iajsd.c")).toBe("*****************")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user