Day 50 of 100: tsconfig Deep Dive — Strict Mode for Test Projects
Day 50 of 100 — 100 Days of Playwright with TypeScript Challenge. Phase: TypeScript. JavaScript (Days 1-33) → TypeScript (Days 34-63) → Playwright (Days 64-96) → AI Framework Capstone (Days 97-100).
🎭 Want to master this with real projects? Join the Playwright Automation Mastery course at The Testing Academy.
tsconfig.json controls the compiler. Strict mode is non-negotiable for test suites. Halfway point — Day 50 of 100.
Contents
The Test-Project tsconfig
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["node"],
"baseUrl": ".",
"paths": { "@pages/*": ["src/pages/*"], "@utils/*": ["src/utils/*"] }
},
"include": ["src", "tests", "playwright.config.ts"]
}
🚀 Level Up Your Playwright
From locators to CI pipelines — build a production-grade Playwright + TypeScript framework step by step.
What strict Actually Enables
- noImplicitAny — untyped params are errors
- strictNullChecks — null/undefined must be handled explicitly
- strictPropertyInitialization — class fields must be assigned
- noUncheckedIndexedAccess (add-on) — arr[0] is T | undefined, forcing checks
Path Aliases in Tests
// Before: import { LoginPage } from '../../../src/pages/LoginPage';
// After: import { LoginPage } from '@pages/LoginPage';
// Refactor-proof imports across deep test folders.
Tomorrow (Day 51): Declaration files and typing third-party code.
🎓 Master Playwright End to End
Join hundreds of SDETs building real automation frameworks. Lifetime access, hands-on projects, and a job-ready portfolio.
