Skip to content

fix: ensure build-less browser tests work with swivel-js v3 #102

@alexanderwende

Description

@alexanderwende

the fetch module in internal uses cross-fetch, which shims the fetch method on node environments which don't yet support it

the problem occurs when running build-less es6 modules in browsers (during tests) when cross-fetch resolves itself to the /dist/browser-ponyfill.js which doesn't export the window's Request class:

https://github.com/Swivel-Finance/swivel-js/blob/v3/src/internal/fetch/index.ts#L55

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions