We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3630a86 commit b1b4601Copy full SHA for b1b4601
1 file changed
src/core/dom.test.js
@@ -10,6 +10,24 @@ describe("core.dom tests", () => {
10
jest.restoreAllMocks();
11
});
12
13
+ describe("jsDOM tests", () => {
14
+ it("jsDOM supports input elements outside forms.", () => {
15
+ document.body.innerHTML = `
16
+ <input name="outside" form="a_form"/>
17
+ <form id="a_form">
18
+ <input name="inside"/>
19
+ </form>
20
+ `;
21
+
22
+ const outside = document.querySelector("input[name=outside]");
23
+ const inside = document.querySelector("input[name=inside]");
24
+ const form = document.querySelector("form");
25
26
+ expect(outside.form).toBe(form);
27
+ expect(inside.form).toBe(form);
28
+ });
29
30
31
describe("document_ready", () => {
32
it("calls the callback, once the document is ready.", async () => {
33
let cnt = 0;
0 commit comments