Lesson 1 of 9
Lesson 01 — Setup environment for TypeScript QA work
Title: Node.js, editor, Git, and your first typed project
Description: Install the toolchain QA automation engineers use daily, scaffold a tiny TypeScript project, and run .ts files without compiling manually each time.
Why it matters for QA: Interview tasks and real repos expect Node projects with typescript, editors that surface type errors early, and repeatable commands (npm test, npx playwright test). Getting comfortable here removes friction before Playwright.
1. Install core tools
- Node.js (LTS) — ships
npmand runs Playwright test runners locally. - VS Code — TypeScript language service built in; extensions optional (ESLint, Playwright).
- Git (optional but recommended) — clone starter repos and submit homework via branches.
2. Create the practice folder
From a terminal:
mkdir ts-qa-course
cd ts-qa-course
npm init -y
npm install typescript ts-node @types/node --save-dev
npx tsc --initWhat you added:
| Package | Role |
|---|---|
typescript | Compiler tsc and type checker |
ts-node | Execute .ts files directly in Node |
@types/node | Types for process, Buffer, module APIs |
3. Minimal index.ts
Create index.ts beside package.json:
const role: string = "QA Engineer";
console.log(`Starting lab as ${role}`);
Run it:
npx ts-node index.tsYou should see the greeting in the terminal.
4. Peek at tsconfig.json
After tsc --init, open tsconfig.json. For QA labs you usually keep defaults first, then tighten later (strict, moduleResolution). Knowing this file exists matters when CI fails only on the build server.
5. Practice checklist
- Confirm
node -vprints an even major (LTS line). - Run
npx ts-node index.tssuccessfully. - Deliberately remove
: stringfromrole, assign123, and read the compiler error — that feedback loop is your mentor.
6. Stretch goal
Add an npm script in package.json:
"scripts": {
"start": "ts-node index.ts"
}Run npm run start. Same output, repeatable command teammates recognize.