fedimovies-web/tests/unit/profile-wrapper.spec.ts

16 lines
424 B
TypeScript
Raw Normal View History

2023-03-05 00:48:33 +00:00
import { expect } from "chai"
import { defaultProfile, ProfileWrapper } from "@/api/users"
describe("ProfileWrapper", () => {
it("Replace invisible characters", () => {
const hidden = ""
expect(hidden.length).to.equal(1)
const profile = new ProfileWrapper({
...defaultProfile(),
username: "test",
display_name: hidden,
})
expect(profile.getDisplayName()).to.equal("test")
})
})