fedimovies-web/tests/unit/profile-wrapper.spec.ts
2023-03-05 14:57:45 +00:00

15 lines
424 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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")
})
})