Skip to content

Commit 69bebc5

Browse files
Copilotmahata
andcommitted
refactor: simplify error message clearing in test
Co-authored-by: mahata <23497+mahata@users.noreply.github.com>
1 parent 47d7502 commit 69bebc5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/components/ErrorBoundary.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export function ThrowLongError() {
1515

1616
export function ThrowErrorWithoutMessage() {
1717
const error = new Error();
18-
// Explicitly remove the message
19-
Object.defineProperty(error, 'message', { value: '' });
18+
error.message = '';
2019
throw error;
2120
}
2221

0 commit comments

Comments
 (0)