Skip to content

is:issue is:open fetch.toString() prints full function code instead of function fetch() { [native code] } #1662

@dahannes

Description

@dahannes

I am testing an app that stores data to indexedDB via localForage

When testing on iOS (11.4) localForage fails to recognize indexedDB and falls back to other storage drivers. Besides other conditions it checks for the availability of fetch like so: fetch.toString().indexOf('[native code') !== -1

This condition returns true when running the app on iOS directly but fails when remote testing the app on iOS via testcafe, because fetch.toString() prints the whole function code instead of function fetch() { [native code] } as expected from any browser.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions