JavaScript bank Quality Engineering JavaScript / 7 questions Your progress 0 / 7 done Saved in this browser. Reset All 7 Easy 1 Medium 5 Hard 1 Hide done No questions match those filters. 1 Explain the testing pyramid (unit, integration, e2e) and where frontend component tests fit. Easy 2 What is the difference between a mock, a stub, and a spy? Give a Jest example of each. Medium 3 Explain React Testing Library's guiding principle of querying by accessibility roles rather than implementation details. Medium 4 How would you test a component that makes an async `fetch` call, mocking the network layer? Medium 5 Explain Jest snapshot testing — what are its pitfalls, and when does it provide false confidence? Medium 6 How do you test a custom React hook in isolation using `renderHook`? Medium 7 Explain test flakiness caused by relying on real timers, and how `jest.useFakeTimers()` helps. Hard ← Previous Type Systems Next → System Design