Part 1. Testing JavaScript applications
1 An introduction to automated testing
1.1 What is an automated test?
1.2 Why automated tests matter
2.2 Unit tests
2.4 End-to-end tests
Acceptance tests and end-to-end tests are not the same
2.5 Exploratory testing and the value of QA
Part 2. Writing tests
3.3 Test doubles: Mocks, stubs, and spies
Don’t test third-party software
To mock, or not to mock: That’s the question
When in doubt, choose integration tests
3.5 Code coverage
What coverage is good for and what it isn’t
4 Testing backend applications
4.1 Structuring a testing environment
4.3 Dealing with external dependencies
5 Advanced backend testing techniques
5.1 Eliminating nondeterminism
Parallelism and shared resources
5.2 Reducing costs while preserving quality
Reducing overlap between tests
Creating transitive guarantees
Turning assertions into preconditions
6 Testing frontend applications
Making it easier to find elements
6.3 Handling events
Testing a localStorage integration
Testing a History API integration
6.5 Dealing with WebSockets and HTTP requests
7.1 Setting up a test environment for React
Setting up a React application
Setting up a testing environment
7.2 An overview of React testing libraries
Rendering components and the DOM
8.1 Testing component integration
8.2 Snapshot testing
8.3 Testing styles
8.4 Component-level acceptance tests and component stories
9.1 The philosophy behind test-driven development
What test-driven development is
Adjusting the size of your iterations
Why adopt test-driven development?
When not to apply test-driven development
9.2 Writing a JavaScript module using TDD
9.3 Testing top-down versus testing bottom-up
What bottom-up and top-down testing mean
How top-down and bottom-up approaches impact a test-driven workflow
The pros and cons of bottom-up versus top-down approaches
9.4 Balancing maintenance costs, delivery speed, and brittleness
9.5 Setting up an environment for TDD to succeed
9.6 TDD, BDD, validations, and specificationsBDD (behavior-driven development)
10 UI-based end-to-end testing
10.1 What are UI-based end-to-end tests?
10.2 When to write each type of test
A note on acceptance testing and this chapter’s name
10.3 An overview of end-to-end testing tools
11 Writing UI-based end-to-end tests
11.1 Your first UI-based end-to-end tests
11.2 Best practices for end-to-end-tests
Avoiding waiting for fixed amounts of time
Stubbing uncontrollable factors
11.4 Running tests on multiple browsers
Using a testing framework to run tests within a browser
Running UI-based tests in multiple browsers
Part 3. Business impact
12 Continuous integration and continuous delivery
12.1 What are continuous integration and continuous delivery?
12.2 The role of automated tests in a CI/CD pipeline
13.1 Using type systems to make invalid states unrepresentable
13.2 Reviewing code to catch problems machines can’t
13.3 Using linters and formatters to produce consistent code
13.4 Monitoring your systems to understand how they actually behave
13.5 Explaining your software with good documentation
44.210.239.12