Skip to content

Commit e1e138b

Browse files
Irfan Ahmadclaude
authored andcommitted
test: remove unnecessary Queue.calls.reset() from refreshMath spec
Empirically verified locally: the test passes without the reset. The reset and its comment (which incorrectly referenced "Jasmine 2.99" — the pinned version is 2.6.4) were added speculatively during the ES6 modernization and are not needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cae2d0e commit e1e138b

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

‎xblocks_contrib/problem/assets/spec/display_spec.js‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -989,15 +989,6 @@ data-url='/problem/quiz/'> \
989989
describe("refreshMath", function () {
990990
beforeEach(function () {
991991
this.problem = new Problem(mockRuntime, $(".xblock-student_view"));
992-
// Reset Queue spy so that bind()'s Queue call ([fn, null, domEl]) is not
993-
// included when toHaveBeenCalledWith scans recorded calls. In Jasmine 2.99,
994-
// toHaveBeenCalledWith iterates ALL recorded calls' args element-by-element
995-
// (even mismatched ones, for diff output). jasmine-jquery's custom equality
996-
// tester calls $(domEl).is(anyString) when comparing a DOM node against a
997-
// string — which throws a Sizzle syntax error if the string isn't a valid
998-
// CSS selector (e.g. "E=mc^2"). Resetting here isolates this describe to
999-
// testing only what refreshMath itself queues.
1000-
MathJax.Hub.Queue.calls.reset();
1001992
$("#input_example_1").val("E=mc^2");
1002993
this.problem.refreshMath({ target: $("#input_example_1").get(0) });
1003994
});

0 commit comments

Comments
 (0)