Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it planned to mock URL.revokeObjectURL? #16

Closed
NandoSangenetto opened this issue Sep 12, 2022 · 3 comments · Fixed by #18 · May be fixed by #17
Closed

Is it planned to mock URL.revokeObjectURL? #16

NandoSangenetto opened this issue Sep 12, 2022 · 3 comments · Fixed by #18 · May be fixed by #17

Comments

@NandoSangenetto
Copy link

NandoSangenetto commented Sep 12, 2022

Is it planned to mock URL.revokeObjectURL?

Just asking if there is a reason not to include it.

@NandoSangenetto
Copy link
Author

By the way, I tried to mock window.URL.revokeObjectURL = jest.fn();.
The error message changes, now I'm getting:

TypeError: Cannot read properties of undefined (reading 'match')
    at k (/Users/fsangenetto/Sites/explorer/node_modules/jsdom-worker/src/index.js:40:21)
    at new Object.<anonymous>.i.Worker (/Users/fsangenetto/Sites/explorer/node_modules/jsdom-worker/src/index.js:124:13)
    at c (/Users/fsangenetto/Sites/explorer/node_modules/@koale/useworker/dist/index.js:1:1970)
    at /Users/fsangenetto/Sites/explorer/node_modules/@koale/useworker/dist/index.js:1:3403
    at fetchTransactions (/Users/fsangenetto/Sites/explorer/src/hooks/useRecentTransactions.ts:58:47)
    at /Users/fsangenetto/Sites/explorer/src/hooks/useRecentTransactions.ts:63:9
    at commitHookEffectListMount (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:23150:26)
    at commitPassiveMountOnFiber (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:24931:11)
    at commitPassiveMountEffects_complete (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:24891:9)
    at commitPassiveMountEffects_begin (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:24878:7)
    at commitPassiveMountEffects (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:24866:3)
    at flushPassiveEffectsImpl (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:27039:3)
    at flushPassiveEffects (/Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:26984:14)
    at /Users/fsangenetto/Sites/explorer/node_modules/react-dom/cjs/react-dom.development.js:26769:9
    at flushActQueue (/Users/fsangenetto/Sites/explorer/node_modules/react/cjs/react.development.js:2667:24)
    at act (/Users/fsangenetto/Sites/explorer/node_modules/react/cjs/react.development.js:2582:11)
    at /Users/fsangenetto/Sites/explorer/node_modules/@testing-library/react/dist/act-compat.js:63:25
    at WS.send (/Users/fsangenetto/Sites/explorer/node_modules/jest-websocket-mock/lib/jest-websocket-mock.cjs.js:165:5)
    at Object.<anonymous> (/Users/fsangenetto/Sites/explorer/src/hooks/useRecentTransactions.test.tsx:41:18)```

@geminiyellow
Copy link

yes, same revokeObjectURL error here.

developit added a commit that referenced this issue Oct 25, 2022
developit added a commit that referenced this issue Oct 25, 2022
@developit
Copy link
Owner

I opened PRs to fix both issues.

developit added a commit that referenced this issue Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants