Skip to content

Commit 388d9c0

Browse files
feat(global-fab): add test components without errorboundaries (#585)
* feat(global-floating-action-button): add CrashListenerWithoutErrorBoundary Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> * feat(global-floating-action-button): add CrashProviderWithoutErrorBoundary Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> --------- Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
1 parent 691fd23 commit 388d9c0

6 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-application-listener-test': patch
3+
---
4+
5+
Add CrashListenerWithoutErrorBoundary
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-application-provider-test': patch
3+
---
4+
5+
Add CrashProviderWithoutErrorBoundary

workspaces/global-floating-action-button/plugins/application-listener-test/report.api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ export const applicationListenerTestPlugin: BackstagePlugin<{}, {}, {}>;
1111
// @public (undocumented)
1212
export const CrashListener: () => never;
1313

14+
// @public (undocumented)
15+
export const CrashListenerWithoutErrorBoundary: {
16+
(): never;
17+
displayName: string;
18+
};
19+
1420
// @public (undocumented)
1521
export const LocationListener: () => null;
1622

workspaces/global-floating-action-button/plugins/application-listener-test/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@
1414
* limitations under the License.
1515
*/
1616
export * from './plugin';
17+
18+
/**
19+
* @public
20+
*/
21+
export const CrashListenerWithoutErrorBoundary = () => {
22+
throw new Error(
23+
'CrashListenerWithoutErrorBoundary failed to render (intentional crash)',
24+
);
25+
};
26+
27+
CrashListenerWithoutErrorBoundary.displayName =
28+
'CrashListenerWithoutErrorBoundary';

workspaces/global-floating-action-button/plugins/application-provider-test/report.api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ export const CountProvider: ({
2828
// @public (undocumented)
2929
export const CrashProvider: () => never;
3030

31+
// @public (undocumented)
32+
export const CrashProviderWithoutErrorBoundary: {
33+
(): never;
34+
displayName: string;
35+
};
36+
3137
// @public (undocumented)
3238
export const TestCardOne: () => JSX_2.Element;
3339

workspaces/global-floating-action-button/plugins/application-provider-test/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ ClassNameGenerator.configure(componentName => {
2222
});
2323

2424
export * from './plugin';
25+
26+
/**
27+
* @public
28+
*/
29+
export const CrashProviderWithoutErrorBoundary = () => {
30+
throw new Error(
31+
'CrashProviderWithoutErrorBoundary failed to render (intentional crash)',
32+
);
33+
};
34+
35+
CrashProviderWithoutErrorBoundary.displayName =
36+
'CrashProviderWithoutErrorBoundary';

0 commit comments

Comments
 (0)