diff --git a/tests/spec/core/dfn-spec.js b/tests/spec/core/dfn-spec.js index 2877489052..9433144a99 100644 --- a/tests/spec/core/dfn-spec.js +++ b/tests/spec/core/dfn-spec.js @@ -418,14 +418,12 @@ describe("Core — Definitions", () => { expect(dfn.dataset.export).toBe(""); }); - // TODO: failing for Chrome, but not Firefox. Needs investigation. - // eslint-disable-next-line jasmine/no-disabled-tests - xit("handles bad attributes", async () => { + it("handles bad attributes", async () => { const body = html`

Attributes

- -attribute + bad attribute

`; @@ -434,7 +432,7 @@ describe("Core — Definitions", () => { const errors = findDfnErrors(doc); expect(errors).toHaveSize(1); - expect(errors[0].message).toContain("-attribute"); + expect(errors[0].message).toContain("bad attribute"); }); it("handles attribute values", async () => { diff --git a/tests/spec/core/validators-spec.js b/tests/spec/core/validators-spec.js index 04db28fdf6..7f813756ad 100644 --- a/tests/spec/core/validators-spec.js +++ b/tests/spec/core/validators-spec.js @@ -14,6 +14,7 @@ describe("Core - Validators", () => { "feGaussianBlur", "body", "html", + "🪳", ]; for (const element of elements) { const dfn = document.createElement("dfn"); @@ -27,10 +28,8 @@ describe("Core - Validators", () => { } }); - // TODO: failing for Chrome, but not Firefox. Needs investigation. - // eslint-disable-next-line jasmine/no-disabled-tests - xit("generates an error if the element name is not valid", () => { - const elements = ["my element", "crypto$", "🪳", "-something", ""]; + it("generates an error if the element name is not valid", () => { + const elements = ["my element", ""]; for (const element of elements) { const dfn = document.createElement("dfn"); const context = `element name: ${element}`; @@ -44,7 +43,12 @@ describe("Core - Validators", () => { }); it("doesn't generates an error if the attribute name is valid", () => { - const attributes = ["crossorigin", "aria-hidden", "aria-roledescription"]; + const attributes = [ + "crossorigin", + "aria-hidden", + "aria-roledescription", + "aria-😇", + ]; for (const attribute of attributes) { const context = `attribute name: ${attribute}`; const dfn = document.createElement("dfn"); @@ -57,10 +61,8 @@ describe("Core - Validators", () => { } }); - // TODO: failing for Chrome, but not Firefox. Needs investigation. - // eslint-disable-next-line jasmine/no-disabled-tests - xit("generates an error if the attribute name is invalid", () => { - const attributes = ["-crossorigin", "-whatever-", "aria-😇"]; + it("generates an error if the attribute name is invalid", () => { + const attributes = ["my attribute", ""]; for (const attribute of attributes) { const context = `attribute name: ${attribute}`; const dfn = document.createElement("dfn");