If you want to find functions that are used only in tests or not used at all, IntelliJ alone can’t fully do it.
The IDE doesn’t semantically distinguish between production code and tests when building its usage graph.
ts-prune is a CLI tool that scans your TypeScript project and lists all exported symbols that are never imported or used and it has ability to ignore test files.
npm install -D ts-prune
npx ts-prune "src" --ignore "src/**/*.test.ts"
Please use it once.