Skip to content

chore(deps): update dependency jasmine-core to v2.99.1#34999

Open
renovate[bot] wants to merge 12 commits intomasterfrom
renovate/jasmine-monorepo
Open

chore(deps): update dependency jasmine-core to v2.99.1#34999
renovate[bot] wants to merge 12 commits intomasterfrom
renovate/jasmine-monorepo

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Jun 17, 2024

This PR contains the following updates:

Package Change Age Confidence
jasmine-core (source) 2.6.42.99.1 age confidence

Release Notes

jasmine/jasmine (jasmine-core)

v2.99.1: 2.99.1

Compare Source

This is a patch release to fix the deprecation message for catch exceptions in 2.99

See #​1497

v2.99.0: 2.99

Compare Source

This release deprecates some things in preparation for Jasmine 3.0. Please see the release notes

v2.9.1: 2.9.1

Compare Source

Please see the release notes

v2.9.0: 2.9.0

Compare Source

Please see the release notes

v2.8.0: 2.8.0

Compare Source

Please see the release notes.

v2.7.0: 2.7.0

Compare 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/jasmine-monorepo branch 16 times, most recently from 82f0583 to 6a325e8 Compare June 24, 2024 08:00
@renovate renovate bot force-pushed the renovate/jasmine-monorepo branch 13 times, most recently from 19da81d to 0c8c6ae Compare July 1, 2024 13:05
@renovate renovate bot force-pushed the renovate/jasmine-monorepo branch 13 times, most recently from fa60c5a to d521507 Compare July 17, 2024 19:33
@renovate renovate bot force-pushed the renovate/jasmine-monorepo branch 4 times, most recently from e7a333f to f619b84 Compare July 19, 2024 13:01
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Mar 5, 2026

Edited/Blocked Notification

Renovate 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.

⚠️ Warning: custom changes will be lost.

renovate bot and others added 12 commits March 5, 2026 13:49
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant