zjquery: Avoid array-related hacks.

Callers can either explicitly pass in children,
stub out $(...)[0] as needed, or just
circumvent jQuery complications with override.

Note the reactions test was broken before,
since $(...)[0] was always returning the same
stub.
This commit is contained in:
Steve Howell
2021-02-22 16:01:29 +00:00
committed by Steve Howell
parent 2b8921bf67
commit 42c2c9fb2d
8 changed files with 30 additions and 12 deletions

View File

@@ -52,6 +52,8 @@ function test_populate(opts) {
table.set_find_results("tr.profile-field-row", rows);
table.set_find_results("tr.profile-field-form", form);
table[0] = "stub";
let num_appends = 0;
table.append = () => {
num_appends += 1;