Courses
Testing dengan Jest & React Testing Library
0/16selesai
Lesson 1•
15 min
Why Test?
Testing makes code reliable.
Simple Test
test('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3); });
Iklan
RTL
render(<App />); const linkElement = screen.getByText(/learn react/i); expect(linkElement).toBeInTheDocument();
Iklan