Skip to content

Commit cb66e04

Browse files
committed
docs(stack-trace): Add story for frames with no filename
1 parent f962b56 commit cb66e04

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

static/app/components/stackTrace/stackTrace.stories.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,41 @@ export default Storybook.story('StackTrace', story => {
10021002
);
10031003
});
10041004

1005+
story('StackTraceProvider - No Filename', () => {
1006+
const event = makeEvent({platform: 'javascript', projectID: '1'});
1007+
const stacktrace: StacktraceWithFrames = {
1008+
framesOmitted: null,
1009+
hasSystemFrames: false,
1010+
registers: {},
1011+
frames: [
1012+
makeFrame({
1013+
filename: null,
1014+
module: null,
1015+
absPath: null,
1016+
function: 'eval',
1017+
lineNo: 5,
1018+
colNo: 20,
1019+
inApp: true,
1020+
}),
1021+
],
1022+
};
1023+
1024+
return (
1025+
<Fragment>
1026+
<p>
1027+
Frames with no filename or module (e.g. browser <code>eval</code>) show a muted{' '}
1028+
<code>{'<unknown>'}</code> in the path slot.
1029+
</p>
1030+
<StoryStackTraceProvider event={event} stacktrace={stacktrace}>
1031+
<StackTraceFrames
1032+
frameContextComponent={FrameContent}
1033+
frameActionsComponent={StoryFrameActions}
1034+
/>
1035+
</StoryStackTraceProvider>
1036+
</Fragment>
1037+
);
1038+
});
1039+
10051040
story('StackTraceProvider - Raw Function and Package', () => {
10061041
const {event, stacktrace} = makeRawFunctionAndPackageStackTraceData();
10071042

0 commit comments

Comments
 (0)