You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
()=>registerSidebarTab(getExampleTab)).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tab is not an object]')
56
+
registerSidebarTab(getExampleTab)
57
+
}).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tab is not an object]')
57
58
})
58
59
59
60
it('fails with missing id',()=>{
60
-
expect(
61
+
expect(()=>{
61
62
// @ts-expect-error mocking for testing
62
-
()=>registerSidebarTab({ ...getExampleTab(),id: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an id conforming to the HTML id attribute specifications]')
}).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an id conforming to the HTML id attribute specifications]')
63
65
})
64
66
65
67
it('fails with non conforming id',()=>{
66
68
expect(()=>registerSidebarTab({ ...getExampleTab(),id: 'this is invalid'})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an id conforming to the HTML id attribute specifications]')
67
69
})
68
70
69
71
it('fails with missing tagName name',()=>{
70
-
expect(
72
+
expect(()=>{
71
73
// @ts-expect-error mocking for testing
72
-
()=>registerSidebarTab({ ...getExampleTab(),tagName: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have the tagName name set]')
()=>registerSidebarTab({ ...getExampleTab(),displayName: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have a name set]')
}).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have a name set]')
90
95
})
91
96
92
97
it('fails with missing icon',()=>{
93
-
expect(
98
+
expect(()=>{
94
99
// @ts-expect-error mocking for testing
95
-
()=>registerSidebarTab({ ...getExampleTab(),iconSvgInline: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an valid SVG icon]')
}).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an valid SVG icon]')
96
102
})
97
103
98
104
it('fails with invalid SVG icon',()=>{
99
105
expect(()=>registerSidebarTab({ ...getExampleTab(),iconSvgInline: 'icon-group'})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an valid SVG icon]')
100
106
})
101
107
102
108
it('fails with missing order',()=>{
103
-
expect(
109
+
expect(()=>{
104
110
// @ts-expect-error mocking for testing
105
-
()=>registerSidebarTab({ ...getExampleTab(),order: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have a numeric order set]')
}).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have a numeric order set]')
112
120
})
113
121
114
122
it('fails with missing "enabled" method',()=>{
115
-
expect(
123
+
expect(()=>{
116
124
// @ts-expect-error mocking for testing
117
-
()=>registerSidebarTab({ ...getExampleTab(),enabled: undefined})).toThrowErrorMatchingInlineSnapshot('[Error: Sidebar tabs need to have an "enabled" method]')
0 commit comments