Topic 6
37 items

TypeScript for Testing

Depth ceilingApplication-level TS to read/write/maintain a Playwright suite (async/await is the real gap). Unlocks the 13% TS-only roles. STOP before compiler-level type gymnastics.

13 MUST · 14 SHOULD · 7 STRETCH · 3 SKIP

not started · 0 written · 37 not started

Node & tooling
not started0/6
  1. MUSTApply
    Node LTS + node/npm/npx mental model

    Install Node LTS and know what node, npm, and npx each do without looking it up.

    Asked Screening/env-setup: 'walk me through setting up a Playwright TS project from zero' or a live 'npm init playwright@latest' run-through.

    named in the job descriptions

  2. MUSTApply
    package.json / scripts / node_modules / lockfile; npm i -D, npm run

    Read package.json, add dev deps, and run/author npm scripts (the pip+venv+pyproject analog).

    Asked 'How do you pin/install test deps?', 'what runs when someone types npm test?' — often a live repo walkthrough.

    named in the job descriptions

  3. MUSTApply
    ES modules — named + default import/export

    Import/export symbols across files the way Playwright suites are structured.

    Asked Live coding: organize a suite into modules; 'default vs named export difference?'

    named in the job descriptions

  4. SHOULDExplain
    tsconfig.json essentials — strict, target, module, paths/baseUrl

    Read a tsconfig and change the few knobs that matter, knowing Playwright only honors allowJs/baseUrl/paths/references.

    Asked 'What does strict mode buy you?', 'how do import aliases work in your framework?'

    asked in interviews, not named in any job description

  5. SHOULDExplain
    ESLint + Prettier — npm run lint, auto-format, CI fails on lint

    Know professional repos lint+format automatically and CI blocks on lint errors.

    Asked 'How do you keep code style consistent across the QA team?' (hygiene signal, rarely deep)

    asked in interviews, not named in any job description

  6. SHOULDApply
    tsc --noEmit as a separate type-check gate (pretest)

    Run type-checking as its own CI step because Playwright runs tests even with type errors.

    Asked 'Playwright ran my test even though it had a type error — why, and how do you enforce types?'

    asked in interviews, not named in any job description

Type system
not started0/10
  1. MUSTApply
    Primitives, arrays, void, any + variable/param/return annotations

    Annotate the 90% of everyday types you actually write in a suite.

    Asked Fundamentals (~25% of TS interviews): 'annotate this function', 'what is any and why avoid it?'

    named in the job descriptions

  2. MUSTApply
    interface / type for object shapes + union types

    Declare the shape of test data and API payloads — the level POM + data factories use.

    Asked Fundamentals + live coding: 'model this JSON as a type', 'what's a union type?'

    named in the job descriptions

  3. SHOULDExplain
    interface vs type (extends, intersection &)

    Give the crisp distinction that is near-guaranteed in a TS screen.

    Asked Near-guaranteed direct question: 'interface vs type — when do you use which?'

    asked in interviews, not named in any job description

  4. SHOULDExplain
    any vs unknown

    Explain why unknown is the safe alternative to any for untyped inputs.

    Asked Common screen: 'any vs unknown — which and why?'

    asked in interviews, not named in any job description

  5. SHOULDApply
    null/undefined, optional ?, non-null !, optional chaining ?., nullish ??

    Handle absent values the way strict mode forces you to in real TS code.

    Asked Code review / live: 'this may be undefined — handle it', '? vs ! vs ?? difference?'

    asked in interviews, not named in any job description

  6. SHOULDApply
    enums / string-literal unions for roles, envs, tags

    Constrain a value to a fixed set (roles, environments, test tags).

    Asked 'enum vs string union?', 'how do you type environments?'

    named in the job descriptions

  7. STRETCHExplain
    Type narrowing / guards (typeof, in, custom is predicates)

    Narrow a union to a concrete type so the compiler lets you use it.

    Asked Advanced chunk: 'how do you safely handle an unknown response?', 'what's a type guard?'

    asked in interviews, not named in any job description

  8. STRETCHApply
    Utility types (consumer) — Partial, Pick, Omit, Record, Required

    Reuse existing types to build test-data variants without redefining shapes.

    Asked Type-system chunk (~35%): 'how would you build flexible test data?', 'name a utility type you've used.'

    asked in interviews, not named in any job description

  9. STRETCHApply
    Generics as consumer (Promise<T>, Array<T>, Locator, Record) + author one <T> helper

    Read the generics Playwright ships and write ONE reusable typed helper — not generic-heavy libraries.

    Asked Expected direct question: 'what is a generic and when would you use one?' — answer + Promise<T>/helper example.

    named in the job descriptions

Async (the Python gap)
not started0/6
  1. MUSTExplain
    Promise concept + Promise<T>

    Understand that a Promise is a future value and Promise<T> types what it resolves to.

    Asked 'What is a Promise?', 'what does Promise<void> mean on this method?'

    named in the job descriptions

  2. MUSTApply
    async function always returns a Promise; await

    The #1 Python-to-TS gap: async/await syntax and that async fns wrap returns in a Promise.

    Asked Live coding + concept: 'why is this function async?', 'what does await do here?'

    named in the job descriptions

  3. MUSTApply
    try/catch around awaits (== Python try/except)

    Handle errors from awaited calls the same way you use try/except in Python.

    Asked 'How do you handle an expected failure/timeout in a test?'

    named in the job descriptions

  4. MUSTOwn
    Every Playwright call must be awaited; missing-await = flaky/false-pass

    The single highest-leverage async fact — turn the Python background into a strength by explaining WHY.

    Asked Near-guaranteed: 'what happens if you forget await?', 'why must every Playwright call be awaited?'

    asked in interviews, not named in any job description

  5. SHOULDApply
    Promise.all for parallel awaits; awaiting in loops

    Run independent async work concurrently and avoid the classic loop-await bug.

    Asked 'How would you speed up test setup with several independent async calls?', 'why doesn't await work inside forEach?'

    asked in interviews, not named in any job description

Playwright-in-TS
not started0/8
  1. MUSTApply
    test, test.describe, beforeEach/afterEach hooks

    Structure a spec file with tests, groups, and setup/teardown hooks.

    Asked Live coding baseline: 'write a test with setup', 'where does login go?'

    named in the job descriptions

  2. MUSTApply
    playwright.config.ts — defineConfig, projects, use, baseURL, reporter, retries

    Read and edit the config you touch constantly (browser matrix, env, reporting, retries).

    Asked 'How do you run cross-browser?', 'where do baseURL/retries/workers live?' — capgemini explicitly probes config tuning.

    named in the job descriptions

  3. MUSTBuild
    Page Object Model class — Locator fields in constructor, async methods : Promise<void>

    The dominant framework pattern JDs demand: a typed POM class wrapping a page.

    Asked Very common live task: 'write a Page Object for this screen', 'how do you structure your framework?'

    named in the job descriptions

  4. MUSTOwn
    Locators (getByRole/getByTestId/getByText) + web-first await expect assertions

    Use modern role/testid locators and auto-retrying web-first assertions — the 2026 baseline, not CSS/XPath sleeps.

    Asked Heavy 2026 focus: 'locator strategy?', 'why getByRole over CSS?', 'how does auto-waiting remove sleeps?'

    named in the job descriptions

  5. SHOULDBuild
    Custom typed fixtures (extend base test)

    Extend base test with typed fixtures (loginPage, apiContext) — the senior differentiator vs beginners who only use beforeEach.

    Asked Senior probe: 'fixtures vs beforeEach?', 'how do you share auth/page objects across tests type-safely?'

    named in the job descriptions

  6. SHOULDBuild
    API testing in TS — request / APIRequestContext, type the response, schema validation

    Test REST APIs in the same TS suite and type/validate the responses — JDs pair UI(TS)+API.

    Asked 'How do you test APIs in Playwright?', 'how do you validate a response schema?'

    named in the job descriptions

  7. SHOULDBuild
    Run in CI — GitHub Actions / Jenkins, HTML/blob reporter, sharding

    Wire the TS suite into CI with reporting and parallel sharding — a frequent hard must-have.

    Asked Must-have: 'how do you run this in Jenkins/GitLab CI?', 'how do you shard/parallelize in CI?'

    named in the job descriptions

  8. STRETCHBuild
    mergeTests multi-fixture composition + fixture options

    Compose multiple fixture sets declaratively — highest single leverage 'framework-owner' signal.

    Asked Architect-level: 'how do you compose fixtures across UI and API suites?'

    asked in interviews, not named in any job description

Playwright-in-TS (added via re-verify)
not started0/4
  1. SHOULDApply
    Network interception / route mocking (route, fulfill, abort) + API mocking

    Intercept and stub network calls to make complex scenarios deterministic — a 2026 interview staple the checklist underweighted.

    Asked Common Playwright question: 'how do you mock an API response / test an error state without a real backend?'

    named in the job descriptions

  2. SHOULDApply
    Auth state reuse — storageState / global setup

    Log in once and reuse the session across hundreds of tests instead of re-logging-in — explicitly probed for senior SDETs in 2026.

    Asked Senior probe: 'how do you handle auth across a large suite without logging in every test?'

    asked in interviews, not named in any job description

  3. SHOULDApply
    Trace viewer / debugging (trace, --ui, retries+trace on failure)

    Debug failures with the trace viewer — 2026 baseline; not knowing it reads as not knowing async in a backend interview.

    Asked 'How do you debug a failing/flaky test?', 'what does the trace viewer show you?'

    asked in interviews, not named in any job description

  4. STRETCHExplain
    Custom expect matchers / expect.extend

    Author a reusable domain assertion — a senior/architect signal, name-drop level.

    Asked Senior probe: 'have you extended expect / built custom matchers?'

    asked in interviews, not named in any job description

Playwright-in-TS (added via pool)
not started0/2
  1. STRETCHRecognize
    Cypress in TS (alternative framework awareness)

    Recognize that some TS UI roles use Cypress rather than Playwright.

    Asked 'You've used Playwright — how does that transfer to Cypress?' on Cypress-shop roles.

    named in the job descriptions

  2. STRETCHExplain
    BDD / Cucumber with TypeScript

    Recognize Cucumber/BDD-in-TS since several pool JDs list it as a plus or stack element.

    Asked 'Have you used Cucumber/BDD?' — a fit filter on specific roles, not universal.

    named in the job descriptions

Frontend/library TS
not started0/1
Write to me

If any of this is something you can help with, or you think I have got it wrong, write and tell me. I read them all myself.

Dhanunjaya M.Dhanunjaya M
tvsdhanan009@gmail.com →

One address, no form, no list to join. I am not asking for money, and there is nothing set up here that could take any.