What are you trying to achieve?
Scenario Steps / failure output for actions called from TypeScript include modules (page objects, custom steps) should show the original .ts path, as the migration guide says:
Error stack traces point at .ts source lines, not transpiled output.
Related: #5362 (closed), #5403. Still reproduces on 4.0.8 and 4.1.0.
What do you get instead?
Test files show .ts correctly. Steps from included .ts files show deleted sibling .temp.mjs paths (and wrong line numbers):
✔ I.click("...") at Object.somePageMethod (file://./pages/home.page.18611.jdt12cwb.temp.mjs:80:11)
✖ I.click("missing") at Test.<anonymous> (./tests/home_test.ts:5:5)
Provide test source code if related
// pages/home.page.ts
const { I } = inject();
module.exports = {
open() {
I.amOnPage('/');
I.click('this does not exist');
},
};
// home_test.ts
Feature('temp paths');
Scenario('fail from page object', ({ homePage }) => {
homePage.open();
});
Details
- CodeceptJS version: 4.0.8 (also verified still present in 4.1.0)
- NodeJS Version: 26.x
- Operating System: macOS
- playwright version: (Playwright helper; unrelated to the path bug)
- Configuration file:
exports.config = {
tests: './tests/**/*.ts',
helpers: { Playwright: { url: 'http://localhost', browser: 'chromium' } },
include: { homePage: './pages/home.page.ts' },
require: ['tsx/cjs'],
};
What are you trying to achieve?
Scenario Steps / failure output for actions called from TypeScript
includemodules (page objects, custom steps) should show the original.tspath, as the migration guide says:Related: #5362 (closed), #5403. Still reproduces on 4.0.8 and 4.1.0.
What do you get instead?
Test files show
.tscorrectly. Steps fromincluded.tsfiles show deleted sibling.temp.mjspaths (and wrong line numbers):Details