Introduction to Software Testing
Why testing matters, the testing pyramid, cost of bugs, coverage as a metric, and a tooling overview for JavaScript/TypeScript and Java projects.
Why testing matters, the testing pyramid, cost of bugs, coverage as a metric, and a tooling overview for JavaScript/TypeScript and Java projects.
jest.fn(), jest.spyOn(), jest.mock() for modules, clearing and resetting mocks, mocking fetch and axios, and testing async code.
React Testing Library setup, render/screen/fireEvent/userEvent, querying by role and text, testing forms, and testing components that fetch async data.
Jest snapshot testing pros and cons, updating snapshots, when to use them, and an introduction to Storybook for visual component testing.
The red-green-refactor cycle, when TDD makes sense, a worked example building a shopping cart in both TypeScript and Java, and common TDD pitfalls.
Strapi testing: setting up a test instance, unit testing services, integration testing controllers and APIs, mocking the Document Service, and CI/CD integration.
Setting up Jest and Vitest, writing describe/it/test blocks, using expect matchers, lifecycle hooks, and running your test suite.