DI + Fake + in-memory: Writing Frontend Tests That Survive Refactors
Originally published at recca0120.github.io
The most common testing pattern I see looks like this:
test('saves user data', () => {
const mockStorage = {
set: vi.fn(),
get: vi.fn().mockReturnValue(null),
};
const service = new UserServic...
recca0120.hashnode.dev6 min read