Refactor: remove dead code

I was mistakenly thinking that you can define variables in beforeEach, but it turns out these are not used.

Rather, Jest was automatically creating variables for the elements according to their IDs. How convenient!
This commit is contained in:
David Cook
2023-11-24 14:08:51 +11:00
parent bc6a83017b
commit 994dd606b9
3 changed files with 1 additions and 23 deletions

View File

@@ -18,9 +18,6 @@ describe("ToggleControlController", () => {
<input id="checkbox" type="checkbox" value="1" data-action="change->toggle-control#disableIfPresent" />
<input id="control" data-toggle-control-target="control">
</div>`;
const checkbox = document.getElementById("checkbox");
const control = document.getElementById("control");
});
it("Disables when checkbox is checked", () => {
@@ -44,9 +41,6 @@ describe("ToggleControlController", () => {
<input id="input" value="" data-action="input->toggle-control#disableIfPresent" />
<input id="control" data-toggle-control-target="control">
</div>`;
const input = document.getElementById("input");
const control = document.getElementById("control");
});
it("Disables when input is filled", () => {