jackbsteinberg / get-originals-rewriter

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

More chaining tests #73

Open fergald opened 5 years ago

fergald commented 5 years ago

69 added nesting but doesn't test applying a method/get/set to the result of a constructor e.g.

let x = new Document().createElement("div");
fergald commented 5 years ago

Also seems to be missing an example of

foo.bar().getter

where .getter is not a data property (.length is in there).

E.g.

let x = document.querySelector("div").textContent;
document.querySelector("div").textContent = "hello";
jackbsteinberg commented 5 years ago

Adding to this issue, chaining in any order not strictly get/sets -> methods will not function correctly (demonstrated further in comments on #69). Tests for cases that don't conform to that order need to be added, and the implementation needs to be corrected to account for this case.