You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing this issue when jest tries to run the mock file
ReferenceError: setImmediate is not defined
12 | }
13 |
> 14 | import { Client } from '@elastic/elasticsearch';
| ^
15 | import Mock from '@elastic/elasticsearch-mock';
16 |
17 | const mock = new Mock();
at Object.<anonymous> (node_modules/@elastic/elasticsearch/lib/Helpers.js:27:30)
at Object.<anonymous> (node_modules/@elastic/elasticsearch/index.js:29:17)
at Object.<anonymous> (__mocks__/elasticsearch.ts:14:1)
Hi All,
This issue is due to test environment, if you are using --env=jsdom you will get this issue.
Please try to remove this --env=jsdom or use --env=node
I am using next.js project with typescript.
I am facing this issue when jest tries to run the mock file
in the file
__mocks__/elasticsearch.ts
The text was updated successfully, but these errors were encountered: