Description |
1 online resource (512 pages) |
|
text file |
Summary |
Testing JavaScript Applications teaches you how to implement an automated testing plan for JavaScript-based web applications. It describes practical testing strategies, covers useful tools and libraries, and explains how to foster a culture of quality. In this clearly-written, example-rich book, you'll explore approaches for both backend and frontend applications and learn how to validate your software much more quickly and reliably. |
Contents |
Intro -- inside front cover -- Testing JavaScript Applications -- Copyright -- dedication -- contents -- front matter -- preface -- acknowledgments -- about this book -- Who should read this book -- How this book is organized: A roadmap -- About the code -- System requirements -- liveBook discussion forum -- about the author -- about the cover illustration -- Part 1. Testing JavaScript applications -- 1 An introduction to automated testing -- 1.1 What is an automated test? -- 1.2 Why automated tests matter -- 1.2.1 Predictability -- 1.2.2 Reproducibility -- 1.2.3 Collaboration -- 1.2.4 Speed |
|
3.2.3 Using custom matchers -- 3.2.4 Circular assertions -- 3.3 Test doubles: Mocks, stubs, and spies -- 3.3.1 Mocking imports -- 3.4 Choosing what to test -- 3.4.1 Don't test third-party software -- 3.4.2 To mock, or not to mock: That's the question -- 3.4.3 When in doubt, choose integration tests -- 3.5 Code coverage -- 3.5.1 Automated coverage reports -- 3.5.2 Coverage types -- 3.5.3 What coverage is good for and what it isn't -- Summary -- 4 Testing backend applications -- 4.1 Structuring a testing environment -- 4.1.1 End-to-end testing -- 4.1.2 Integration testing -- 4.1.3 Unit testing |
|
4.2 Testing HTTP endpoints -- 4.2.1 Testing middleware -- 4.3 Dealing with external dependencies -- 4.3.1 Integrations with databases -- 4.3.2 Integrations with other APIs -- Summary -- 5 Advanced backend testing techniques -- 5.1 Eliminating nondeterminism -- 5.1.1 Parallelism and shared resources -- 5.1.2 Dealing with time -- 5.2 Reducing costs while preserving quality -- 5.2.1 Reducing overlap between tests -- 5.2.2 Creating transitive guarantees -- 5.2.3 Turning assertions into preconditions -- Summary -- 6 Testing frontend applications -- 6.1 Introducing JSDOM -- 6.2 Asserting on the DOM |
|
6.2.1 Making it easier to find elements -- 6.2.2 Writing better assertions -- 6.3 Handling events -- 6.4 Testing and browser APIs -- 6.4.1 Testing a localStorage integration -- 6.4.2 Testing a History API integration -- 6.5 Dealing with WebSockets and HTTP requests -- 6.5.1 Tests involving HTTP requests -- 6.5.2 Tests involving WebSockets -- Summary -- 7 The React testing ecosystem -- 7.1 Setting up a test environment for React -- 7.1.1 Setting up a React application -- 7.1.2 Setting up a testing environment -- 7.2 An overview of React testing libraries -- 7.2.1 Rendering components and the DOM |
Subject |
JavaScript (Computer program language)
|
|
Application software -- Development.
|
|
JavaScript (Langage de programmation) |
|
Logiciels d'application -- Développement. |
|
Application software -- Development |
|
JavaScript (Computer program language) |
Added Author |
Safari, an O'Reilly Media Company.
|
Other Form: |
Print version: Da Costa, Lucas. Testing JavaScript Applications. 1st edition. Manning Publications, 2021 9781617297915 1617297917 (DLC) 2019461141 (OCoLC)1199057141 |
ISBN |
9781638356394 (electronic bk.) |
|
1638356394 (electronic bk.) |
Standard No. |
9781617297915 |
|