Skip to content

dandv/ts-jest-tla

Repository files navigation

Can't use top-level await with ts-jest

npm run tla shows that top-level await works with ts-node.

npm test shows that the await line in add.test.js causes error TS1378:

Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.

However, tsconfig.json already contains these settings:

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext"
  }
}

About

Can't use top-level await with ts-jest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published