Closed moltar closed 3 years ago
I have the same Problem.. im using ts-node
@sindresorhus: I have the same problem too.
Tried to apply your guide but it doesn't work fine. 🤔 I did a minimal reproduction in this repo.
Same here. I've tried all possible solution permutations and nothing helps.
I'm also running into this issue with jest. Strangely it seems to have no problem with p-map
Hi guys,
I had the same issue and I tried to fix it by mocking this library.
I created a file in __mocks__/p-queue.ts
// __mocks__/p-queue.ts
export default class PQueue {
constructor() {
return this;
}
add(fn) {
return fn();
}
pause() {}
clear() {}
}
In my small project, I just used add
, pause
and clear
methods. But you can add any other methods that you are usng in your project to make it work.
I am not sure where the problem is, but I cannot seem to get the latest major upgrade (pure ESM) to work in Jest with TypeScript.
Simplest failure mode:
Jest config:
Any ideas?
Thanks!