[wp-trac] [WordPress Trac] #64228: Update `sinon` npm dependency
WordPress Trac
noreply at wordpress.org
Tue Nov 11 01:35:49 UTC 2025
#64228: Update `sinon` npm dependency
------------------------------+-----------------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Keywords: good-first-bug
Focuses: javascript |
------------------------------+-----------------------------
The [https://www.npmjs.com/package/sinon Sinon dependency] is used to
create spies and stubs for use within QUnit tests.
There are some breaking changes that are causing issues in the test suite
that need to be addressed before upgrading.
Here is the output when running `npm run grunt qunit:compiled` using
`sinon at 21.0.0`:
{{{
Running "qunit:files" (qunit) task
Testing tests/qunit/compiled.html JQMIGRATE: Migrate is installed, version
3.4.1
Failed to load resource: net::ERR_FILE_NOT_FOUND
.............................................................................................Access
to XMLHttpRequest at 'file:///wp-admin/admin-ajax.php' from origin 'null'
has been blocked by CORS policy: Cross origin requests are only supported
for protocol schemes: http, data, isolated-app, chrome-extension, chrome,
https, chrome-untrusted.
Failed to load resource: net::ERR_FAILED
.....................................................................................FF.................................
>> dashboard > communityEvents.getTimeZone > modern browsers should return
a time zone name
>> Message: undefined
>> Actual: UTC
>> Expected: America/Chicago
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:154:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> dashboard > communityEvents.getTimeZone > older browsers should
fallback to a raw UTC offset
>> Message: negative offset
>> Actual: UTC
>> Expected: -300
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:166:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> Message: no offset
>> Actual: UTC
>> Expected: 0
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:170:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> Message: positive offset
>> Actual: UTC
>> Expected: 300
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:174:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
Testing tests/qunit/index.html JQMIGRATE: Migrate is installed with
logging active, version 3.4.1
Failed to load resource: net::ERR_FILE_NOT_FOUND
.............................................................................................Access
to XMLHttpRequest at 'file:///wp-admin/admin-ajax.php' from origin 'null'
has been blocked by CORS policy: Cross origin requests are only supported
for protocol schemes: http, data, isolated-app, chrome-extension, chrome,
https, chrome-untrusted.
Failed to load resource: net::ERR_FAILED
.....................................................................................FF.................................
>> dashboard > communityEvents.getTimeZone > modern browsers should return
a time zone name
>> Message: undefined
>> Actual: UTC
>> Expected: America/Chicago
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:154:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> dashboard > communityEvents.getTimeZone > older browsers should
fallback to a raw UTC offset
>> Message: negative offset
>> Actual: UTC
>> Expected: -300
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:166:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> Message: no offset
>> Actual: UTC
>> Expected: 0
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:170:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
>> Message: positive offset
>> Actual: UTC
>> Expected: 300
>> at Object.<anonymous> (file:///home/runner/work/wordpress-develop
/wordpress-develop/tests/qunit/wp-admin/js/dashboard.js:174:12)
>> at callSandboxedFn (file:///home/runner/work/wordpress-develop
/wordpress-develop/node_modules/sinon-test/dist/sinon-test.js:172:29)
>> at Object.sinonAsyncSandboxedTest (file:///home/runner/work
/wordpress-develop/wordpress-develop/node_modules/sinon-test/dist/sinon-
test.js:192:30)
Warning: 426 tests completed in 5685ms, with 4 failed, 0 skipped, and 0
todo. Use --force to continue.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64228>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list