Open hyperactivepuss opened 2 weeks ago
so it's definitely about modules with this config it works
{
"extensions": [
"ts"
],
"filePatterns": [
"**/*.test.ts"
],
"parameters": [
"--import",
"tsx"
]
}
but out put looks not "pretty"
and with tsx its obviously doesn't resolve stuff like this
before(async () => {
testPictureBase64 = await fs.readFile(`${import.meta.dirname}/signal.jpg`, { encoding: 'base64' })
})
so need to do this hack only to have the ability to run a single test with the extension
`${import.meta.dirname ?? __dirname}/signal.jpg`
I went through some issues here and it seems vscode variables should work fine but, nevertheless, I get this error also using 'tsconfig-paths' and 'ts-node/esm' package.json => "type": "module"
If replace
${workspaceFolder}
with../../../../
everything works fine also mentioned it here https://github.com/connor4312/nodejs-testing/issues/33#issuecomment-2204095372