word-counter-api/CLAUDE.md
ai-implementer b8c9417961 Install and configure Jest test runner (WCTAS-4)
Adds jest, ts-jest, ts-node, and @types/jest as devDependencies and creates
jest.config.ts with the ts-jest preset. `npm test` exits 0 with no test files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 11:04:01 +00:00

1.7 KiB

word-counter-api

Project Status

Node.js/TypeScript project initialized with npm, tsconfig, and Jest (ts-jest). Source code implementation is pending.

Build Commands

npm install        # install dependencies
npm run build      # compile TypeScript → dist/ via tsc

Test Commands

npm test                          # run full Jest test suite
npm test -- path/to/file.test.ts  # run a single test file
npm test -- -t "test name"        # run a single named test

Development Commands

npm run dev    # tsx watch src/server.ts (TypeScript watch mode)
npm start      # node dist/server.js (production build)

Project Structure

word-counter-api/
├── src/              # TypeScript source files (to be added)
│   └── server.ts     # Entry point
├── dist/             # Compiled JavaScript output (gitignored)
├── jest.config.ts    # Jest config (ts-jest preset, passWithNoTests)
├── package.json      # npm manifest with build/start/dev/test scripts
├── tsconfig.json     # TypeScript config (CommonJS, strict mode)
├── .gitignore
├── README.md
└── CLAUDE.md         # This file

Architecture Notes

  • Purpose: An API service for counting words in text input.
  • Stack: Node.js + TypeScript (CommonJS modules, tsc build, tsx for dev watch).
  • HTTP framework: Express (express + @types/express).
  • Key design decisions still to make: authentication strategy, request/response format (REST vs. GraphQL), deployment target.

Code Style

TypeScript strict mode is enabled ("strict": true in tsconfig.json). No linter or formatter configured yet. Document here once a stack is chosen (e.g., ESLint/Prettier).