Checklist progress
0/168Learned
JavaScript Developer
Study Checklist
Checklist progress
0/168Learned
With a block of code and the associated Unit Test, determine where the test is ineffective and modify it to make it more effective.
0/12
Unit tests versus integration tests versus end-to-end tests: scope, speed, and isolation tradeoffs
Learn this conceptTest structure with describe, it/test, beforeEach, afterEach, beforeAll, afterAll blocks
Learn this conceptCommon Jest/Jasmine matchers: toBe, toEqual, toBeTruthy, toBeFalsy, toThrow, toHaveBeenCalledWith
Learn this concepttoBe versus toEqual: reference equality versus deep structural equality for objects and arrays
Learn this conceptIdentifying a test that does not assert the correct output and rewriting the assertion
Learn this conceptTesting asynchronous code: using async/await or returning a Promise in a test case
Learn this conceptjest.fn() for creating mock functions versus jest.spyOn() for spying on existing methods
Learn this conceptSpy functions: tracking calls and arguments to a function without altering its behavior
Learn this conceptjest.mock() for auto-mocking an entire module so all its exports become jest.fn() stubs
Learn this conceptPrepare for the Exam
Study Community
Ask questions and get the latest info from other JavaScript Developer studiers. 593 members and growing.
jest.mock() replaces imported modules with custom implementations during Jest tests, isolating your component from external dependencies like labels, Apex calls, or Lightning services. This ensures tests run in a consistent environment without relying on actual Salesforce schema or server behavior.