chore(deps): update dependency jasmine-core to v2.99.1#34999
Open
renovate[bot] wants to merge 12 commits intomasterfrom
Open
chore(deps): update dependency jasmine-core to v2.99.1#34999renovate[bot] wants to merge 12 commits intomasterfrom
renovate[bot] wants to merge 12 commits intomasterfrom
Conversation
82f0583 to
6a325e8
Compare
19da81d to
0c8c6ae
Compare
fa60c5a to
d521507
Compare
e7a333f to
f619b84
Compare
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
…it()
Jasmine 2.99.x added ensureIsNotNested() which throws
'afterEach' should only be used in 'describe' function
when afterEach() is called from inside a running spec.
AjaxHelpers.requests() calls afterEach() internally, so it must
be called from a describe() body. Replicate the createFakeRequests()
pattern in beforeEach/afterEach instead:
- Set up sinon.useFakeXMLHttpRequest() in describe('Basic') beforeEach
- Tear down in afterEach via requests.restore()
- Remove inline AjaxHelpers.requests(this) from 3 it() bodies
- Remove AjaxHelpers.requests(that) from clickDeleteItem() helper
(uses the module-level requests variable instead)
This file was a cascade-causing failure: sinon's fake XHR was left
active after the suite ran, intercepting requests from later suites.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… it() Jasmine 2.99.x throws when afterEach() is called from inside a running spec. AjaxHelpers.requests() calls afterEach() internally, so it must be called from a describe() body. Move fake XHR setup to the top-level beforeEach/afterEach using sinon.useFakeXMLHttpRequest() directly, so all nested describe blocks share a single module-level requests array. Remove all inline AjaxHelpers.requests() calls (12 it() bodies + 2 helper functions). This file was a cascade-causing failure: sinon's fake XHR was left active after the suite ran, intercepting requests from later suites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move fake XHR setup to describe-level beforeEach/afterEach using sinon.useFakeXMLHttpRequest() directly. Remove ~50 inline AjaxHelpers.requests(this) calls from it() bodies including the testSendsAjax() helper that generated it() blocks inline. AjaxHelpers is still imported and used for its utility functions (respondWithJson, expectJsonRequest, expectNoRequests, etc.) which only operate on the requests array and don't call afterEach() internally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move fake XHR setup to describe-level beforeEach/afterEach. Remove ~30 inline AjaxHelpers.requests(this) calls from it() bodies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…axHelpers inside it() Move fake XHR setup to describe-level beforeEach/afterEach in each file. Remove inline AjaxHelpers.requests(this) calls from it() bodies and helper functions (assets_spec.js setup() helper). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move fake XHR setup to describe-level beforeEach/afterEach. Remove inline AjaxHelpers.requests(this) calls from it() bodies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ttern AjaxHelpers.server() calls afterEach() internally, which throws in jasmine 2.99.x when called from inside an it() body. Replace AjaxHelpers.server([...]) in each it() with: - sinon.fakeServer.create() in beforeEach - server.respondWith([...]) per test - server.restore() in afterEach Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Files fixed:
- upload_spec.js: add XHR setup to describe("Uploads") lifecycle hooks
- xblock_spec.js: add XHR setup to describe('XBlockView') lifecycle hooks;
fix postXBlockRequest(AjaxHelpers.requests(this), []) inline call
- unit_outline_spec.js: remove AjaxHelpers.requests(test) from
createUnitOutlineView() helper; use describe-level lifecycle hooks
- move_xblock_modal_spec.js: add XHR setup to describe lifecycle hooks
- course_rerun_spec.js: add XHR setup to describe lifecycle hooks
- library_users_spec.js: add XHR setup to both describe blocks
- drag_and_drop_spec.js: add XHR setup to describe('AJAX') lifecycle hooks
(sinon already imported)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Jasmine 2.99.x added ensureIsNotNested() which throws when afterEach() is called from within a running spec. AjaxHelpers.requests() calls afterEach() internally, so it cannot be used from it() bodies or helper functions that are called from it() bodies. Files fixed: - xblock_editor_spec.js (ES6 imports) - modals/edit_xblock_spec.js (15 calls in it() bodies) - xblock_string_field_editor_spec.js (calls in it() and helper) - container_spec.js (init() helper returned requests) - move_xblock_spec.js (6 calls in it() bodies) - pages/container_spec.js (renderContainerPage helper) - pages/course_outline_spec.js (createCourseOutlinePage helper) - pages/container_subviews_spec.js (called from beforeEach) - assets_squire_spec.js (factory functions inside async beforeEach) Pattern: move sinon.useFakeXMLHttpRequest() setup into describe-level beforeEach/afterEach; keep AjaxHelpers utility functions unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….99.x
AjaxHelpers.requests() internally calls afterEach() to restore the sinon
fake XHR, but Jasmine 2.99.x forbids calling afterEach() from within a
running spec (it() body) or helper functions called from it() bodies,
producing: 'afterEach' should only be used in 'describe' function.
Replace all occurrences across 44 spec files by moving sinon fake XHR
setup into beforeEach/afterEach at the describe scope using the pattern:
xhrFactory = sinon.useFakeXMLHttpRequest();
requests = []; requests.currentIndex = 0;
requests.restore = function() { xhrFactory.restore(); };
xhrFactory.onCreate = function(req) { requests.push(req); };
See https://jasmine.github.io/api/2.99/global.html#afterEach for the
restriction that afterEach must be called at describe scope.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…quire conflict The sync sinon fake XHR beforeEach was running before the async Squire beforeEach that calls injector.require(). This caused sinon to intercept RequireJS's internal XHR module-loading requests, so done() was never called and sinon was left in a broken state. This cascaded to fail subsequent test files (e.g. group_configuration_spec.js) with "xhrFactory.restore is not a function". Fix: run the async Squire beforeEach first (modules load via real XHR), then activate sinon fake XHR in a second sync beforeEach. Also consolidate the two afterEach blocks in "Asset view" into one. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.6.4→2.99.1Release Notes
jasmine/jasmine (jasmine-core)
v2.99.1: 2.99.1Compare Source
This is a patch release to fix the deprecation message for catch exceptions in 2.99
See #1497
v2.99.0: 2.99Compare Source
This release deprecates some things in preparation for Jasmine 3.0. Please see the release notes
v2.9.1: 2.9.1Compare Source
Please see the release notes
v2.9.0: 2.9.0Compare Source
Please see the release notes
v2.8.0: 2.8.0Compare Source
Please see the release notes.
v2.7.0: 2.7.0Compare Source
Please see the release notes.
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) in timezone America/New_York, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.