Generated Fastify ESM/TS app has broken `npm test` command (FASTIFY_AUTOLOAD_TYPESCRIPT)
- Dominant language
- JavaScript
- Stars
- 733
- Forks
- 177
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 3
Description
### Prerequisites
- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the bug has not already been reported
### Fastify version
7.4.0
### Plugin version
_No response_
### Node.js version
24.4.0
### Operating system
Windows
### Operating system version (i.e. 20.04, 11.3, 10)
11
### Description
Setup
```
fastify generate fastify-test --lang=ts --esm
cd fastify-test
npm install
```
Attempt
```
npm test
```
Outcome
```
> fastify-test@1.0.0 test
> npm run build:ts && tsc -p test/tsconfig.json && FASTIFY_AUTOLOAD_TYPESCRIPT=1 node --test --experimental-test-coverage --loader ts-node/esm test/**/*.ts
> fastify-test@1.0.0 build:ts
> tsc
'FASTIFY_AUTOLOAD_TYPESCRIPT' is not recognized as an internal or external command,
operable program or batch file.
```
### Link to code that reproduces the bug
see above
### Expected Behavior
`npm test` should successfully run as generated.
Contributor guide
Assessment
This issue has not been assessed yet.