Add crash test button to Storybook for Sentry verification
Throws an uncaught error from a press handler so it reaches Sentry's global error handler; fatal in production builds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RhCxLTu44o84eWMM8ESWTr
This commit is contained in:
@@ -110,6 +110,21 @@ export default function Storybook() {
|
|||||||
</Button>
|
</Button>
|
||||||
<InviteFriendsDialog control={inviteFriendsControl} />
|
<InviteFriendsDialog control={inviteFriendsControl} />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
color="negative"
|
||||||
|
size="large"
|
||||||
|
onPress={() => {
|
||||||
|
/*
|
||||||
|
* Intentionally uncaught so it reaches Sentry's global error
|
||||||
|
* handler. In production builds this is a fatal crash.
|
||||||
|
*/
|
||||||
|
throw new Error('Test crash from Storybook')
|
||||||
|
}}
|
||||||
|
label="Crash the app"
|
||||||
|
testID="storybookCrashBtn">
|
||||||
|
<ButtonText>Crash the app (test Sentry)</ButtonText>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<ThemeProvider theme="light">
|
<ThemeProvider theme="light">
|
||||||
<Theming />
|
<Theming />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|||||||
Reference in New Issue
Block a user