Fix tests

This commit is contained in:
Will Hunt 2021-12-02 13:37:46 +00:00
parent da20ebc855
commit 68ea138d63

View File

@ -71,15 +71,15 @@ describe("FormatUtilTest", () => {
});
});
it("should correctly format one detailed label", () => {
expect(FormatUtil.formatLabels([{name: "foo", color: '#FFFFFF', description: 'My label'}])).to.deep.equal({
expect(FormatUtil.formatLabels([{name: "foo", color: 'FFFFFF', description: 'My label'}])).to.deep.equal({
plain: "foo",
html: "<span data-mx-bg-color=\"#FFFFFF\" data-mx-color=\"#000000\" title=\"My label\">foo</span>"
});
});
it("should correctly format many detailed labels", () => {
expect(FormatUtil.formatLabels([
{name: "foo", color: '#FFFFFF', description: 'My label'},
{name: "bar", color: '#AACCEE', description: 'My other label'},
{name: "foo", color: 'FFFFFF', description: 'My label'},
{name: "bar", color: 'AACCEE', description: 'My other label'},
])).to.deep.equal({
plain: "foo, bar",
html: "<span data-mx-bg-color=\"#FFFFFF\" data-mx-color=\"#000000\" title=\"My label\">foo</span> "