We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
I'm investigating this library's feasibility for a course I tutor, as a less problematic (and hopefully faster) alternative to sync-request.
sync-request
However, in my test repository, the import appears to fail.
/home/migue/Source/COMP/1531/best-test-request/node_modules/await-sync/mod.js:4 const Work = globalThis.Worker || await import('whatwg-worker').then(m => m.default) ^^^^^ SyntaxError: await is only valid in async functions and the top level bodies of modules 2 | import inject from 'light-my-request'; 3 | import server from '../express_app/server'; > 4 | import { createWorker } from 'await-sync'; | ^ 5 | 6 | const awaitSync = createWorker(); 7 | at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1495:14) at Object.require (tests/server.test.js:4:1)
You can see the code I'm using by visiting this file in my testing repository.
Perhaps the library is having an issue with Jest's runtime? How should I get it to work correctly?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
I'm investigating this library's feasibility for a course I tutor, as a less problematic (and hopefully faster) alternative to
sync-request
.However, in my test repository, the import appears to fail.
You can see the code I'm using by visiting this file in my testing repository.
Perhaps the library is having an issue with Jest's runtime? How should I get it to work correctly?
The text was updated successfully, but these errors were encountered: