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
Hi, our team started using this package but later found that this doesn't work on windows machines (the team has a mix of windows and mac users). "Unable to expose method "then"" still shows up. On a windows machine I have tried running the tests in this package, which shows the same problem:
$ npm run test
> [email protected] test
> jest
PASS __tests__/index.ts
FAIL __tests__/request-promise.ts
● Test suite failed to run
Unable to expose method "then"
1 | import "request-promise";
> 2 | import "request-promise-native";
| ^
3 |
4 | it("should not fail miserably", () => {
5 | expect(true).toBeTruthy();
at Object.plumbing.exposePromiseMethod (node_modules/request-promise-core/lib/plumbing.js:140:19)
at Object.<anonymous> (__tests__/request-promise.ts:2:1)
Test Suites: 1 failed, 1 passed, 2 total
Tests: 4 passed, 4 total
Snapshots: 4 passed, 4 total
Time: 1.407s
Ran all test suites.
What I did was list out the 2 request-promise packages in jest.config.js which makes the tests pass:
Hi, our team started using this package but later found that this doesn't work on windows machines (the team has a mix of windows and mac users). "Unable to expose method "then"" still shows up. On a windows machine I have tried running the tests in this package, which shows the same problem:
What I did was list out the 2 request-promise packages in jest.config.js which makes the tests pass:
In our own code we have the transform section written similarly:
Is there any issue with doing it this way? If not, I could create a pull request to update the config.
The text was updated successfully, but these errors were encountered: