I’m facing an issue while executing my Jest tests. Whenever I attempt to import the Airtable library in my test scripts, I encounter an error that halts the process.
The problem arises immediately upon importing Airtable:
import AirtableService from 'airtable'
This is the error message I receive:
TypeError: Cannot read property 'bind' of undefined
> 1 | import AirtableService from 'airtable'
| ^
at Object.<anonymous> (node_modules/airtable/src/fetch.ts:5:80)
at Object.<anonymous> (node_modules/airtable/src/base.ts:5:1)
at Object.<anonymous> (node_modules/airtable/src/airtable.ts:1:1)
It appears that the issue is originating from the Airtable library itself, particularly within the fetch.ts file. Has anyone else experienced this? I’m uncertain whether this is a configuration problem with Jest or something else.