Skip to content

fix(theme-common): remove useless useSyncExternalStore shim #3516

fix(theme-common): remove useless useSyncExternalStore shim

fix(theme-common): remove useless useSyncExternalStore shim #3516

Triggered via pull request September 4, 2023 13:14
Status Failure
Total duration 11m 0s
Artifacts

tests-windows.yml

on: pull_request
Matrix: Windows Tests
Fit to window
Zoom out
Zoom in

Annotations

6 errors
Tabs › accept querystring=true when groupId is defined: packages/docusaurus-theme-common/lib/utils/storageUtils.js#L70
expect(received).not.toThrow() Error name: "Error" Error message: "Illegal storage API usage for storage key \"docusaurus.tab.my-group-id\". Docusaurus storage APIs are not supposed to be called on the server-rendering process. Please only call storage APIs in effects and event handlers." 68 | function createServerStorageSlot(key) { 69 | function throwError() { > 70 | throw new Error(`Illegal storage API usage for storage key "${key}". | ^ 71 | Docusaurus storage APIs are not supposed to be called on the server-rendering process. 72 | Please only call storage APIs in effects and event handlers.`); 73 | } at Object.throwError (packages/docusaurus-theme-common/lib/utils/storageUtils.js:70:15) at get (packages/docusaurus-theme-common/lib/utils/storageUtils.js:166:73) at mountSyncExternalStore (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6816:20) at Object.useSyncExternalStore (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7701:14) at Object.useSyncExternalStore (node_modules/react/cjs/react.development.js:1676:21) at Object.useStorageSlot (packages/docusaurus-theme-common/lib/utils/storageUtils.js:166:91) at useTabStorage (packages/docusaurus-theme-common/lib/utils/tabsUtils.js:113:53) at Object.useTabStorage (packages/docusaurus-theme-common/lib/utils/tabsUtils.js:130:45) at TabsComponent (packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx:140:30) at renderWithHooks (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6351:18) at mountIndeterminateComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:9855:13) at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11312:16) at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15811:12) at workLoopSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15745:5) at renderRootSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15717:7) at performSyncWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15422:20) at flushSyncCallbacks (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2597:22) at flushSyncCallbacksOnlyInLegacyMode (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2576:5) at scheduleUpdateOnFiber (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14910:7) at updateContainer (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:17770:5) at Object.create (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:18510:3) at create (packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx:164:16) at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:74:11) at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:320:21) at Object.toThrow (packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx:172:12) at Object.toThrow (packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx:172:12)
Windows Tests (16.14)
Process completed with exit code 1.
Windows Tests (16)
The job was canceled because "_16_14" failed.
Windows Tests (16)
The operation was canceled.
Windows Tests (18)
The job was canceled because "_16_14" failed.
Windows Tests (18)
The operation was canceled.