element-hq / element-hq/element-web

Default mocks should throw instead of silently return

Open
#19,457 6 comments 0 reactions 0 assignees View on GitHub
A-Developer-Experience A-Testing Hacktoberfest Help Wanted T-Task
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

In a couple places we mock entire classes and override what we need - we should throw by default instead of returning `undefined`.

The `undefined` return is not intuitive, leading developers to think that their code is broken when in fact it's just mocked and short-circuiting.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.