🚩 [4.0.1-beta.23]
Due to multiple teams, we're using som aliases to avoid long import path and handle more easily scope changes.
Aliases work with both ts-node and tsx; moreover it used to work with codeceptjs x ts-node.
But for some reason, it doesn't work with codeceptjs x tsx - I guess there may be a limitation (?) on the internal transpiler.
How to reproduce:
n.lespiaucq@JXQ1VH4T69 examples-ts % npx tsx test.ts
todoMvcUrl: https://todomvc.com/examples/react/dist/
n.lespiaucq@JXQ1VH4T69 examples-ts % npx codeceptjs run
ts-node package is required to parse codecept.conf.ts config correctly
CodeceptJS v3.7.5 #StandWithUkraine
Using test root "/Users/n.lespiaucq/Documents/xxx/examples-ts"
Create Todos with BDD --
✖ Create a single todo item @bdd in 40ms
-- FAILURES:
- Create Todos with BDD
Create a single todo item @bdd:
Could not include object undefined from module '/Users/n.lespiaucq/Documents/xxx/examples-ts/todomvc-tests/pages/todos.page.ts'
Unexpected token ':'
SyntaxError: Unexpected token ':'
at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:316:18)
...
Error: Could not include object undefined from module '/Users/n.lespiaucq/Documents/xxx/examples-ts/todomvc-tests/pages/todos.page.ts'
Unexpected token ':'
SyntaxError: Unexpected token ':'
🚩 [4.0.1-beta.23]
Due to multiple teams, we're using som aliases to avoid long import path and handle more easily scope changes.
Aliases work with both ts-node and tsx; moreover it used to work with codeceptjs x ts-node.
But for some reason, it doesn't work with codeceptjs x tsx - I guess there may be a limitation (?) on the internal transpiler.
How to reproduce:
✅ ts-node - codeceptjs 3.x = OK
See branch: https://github.com/nlespiaucq/examples-ts/tree/3.x-aliases
Run:
npx codeceptjs run✅ tsx - regular script
See branch: https://github.com/nlespiaucq/examples-ts/tree/4.x-aliases
Run:
npx tsx test.ts(refer to https://github.com/nlespiaucq/examples-ts/blob/4.x-aliases/test.ts)See branch: https://github.com/nlespiaucq/examples-ts/tree/4.x-aliases
Run:
npx codeceptjs run