Skip to content

Commit 6dadf25

Browse files
committed
fix: correct wrapper use
1 parent 17c05f0 commit 6dadf25

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/compass-components/src/components/context-menu.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('useContextMenuItems', function () {
3838

3939
expect(() => {
4040
render(
41-
<ContextMenuProvider wrapper={ContextMenu}>
41+
<ContextMenuProvider menuWrapper={ContextMenu}>
4242
<TestComponent items={items} />
4343
</ContextMenuProvider>
4444
);

packages/compass-components/src/components/context-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function ContextMenuProvider({
1414
children: React.ReactNode;
1515
}) {
1616
return (
17-
<ContextMenuProviderBase wrapper={ContextMenu}>
17+
<ContextMenuProviderBase menuWrapper={ContextMenu}>
1818
{children}
1919
</ContextMenuProviderBase>
2020
);

packages/compass-context-menu/src/context-menu-provider.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ describe('ContextMenuProvider', function () {
1717
it('throws an error when providers are nested', function () {
1818
expect(() => {
1919
render(
20-
<ContextMenuProvider wrapper={TestMenu}>
20+
<ContextMenuProvider menuWrapper={TestMenu}>
2121
<div>
22-
<ContextMenuProvider wrapper={TestMenu}>
22+
<ContextMenuProvider menuWrapper={TestMenu}>
2323
<TestComponent />
2424
</ContextMenuProvider>
2525
</div>
@@ -34,7 +34,7 @@ describe('ContextMenuProvider', function () {
3434
describe('when not nested', function () {
3535
it('renders without error', function () {
3636
render(
37-
<ContextMenuProvider wrapper={TestMenu}>
37+
<ContextMenuProvider menuWrapper={TestMenu}>
3838
<TestComponent />
3939
</ContextMenuProvider>
4040
);

packages/compass-context-menu/src/use-context-menu.spec.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ describe('useContextMenu', function () {
136136

137137
it('renders without error', function () {
138138
render(
139-
<ContextMenuProvider wrapper={TestMenu}>
139+
<ContextMenuProvider menuWrapper={TestMenu}>
140140
<TestComponent />
141141
</ContextMenuProvider>
142142
);
@@ -148,7 +148,7 @@ describe('useContextMenu', function () {
148148
const onRegister = sinon.spy();
149149

150150
render(
151-
<ContextMenuProvider wrapper={TestMenu}>
151+
<ContextMenuProvider menuWrapper={TestMenu}>
152152
<TestComponent onRegister={onRegister} />
153153
</ContextMenuProvider>
154154
);
@@ -159,7 +159,7 @@ describe('useContextMenu', function () {
159159

160160
it('shows context menu on right click', function () {
161161
render(
162-
<ContextMenuProvider wrapper={TestMenu}>
162+
<ContextMenuProvider menuWrapper={TestMenu}>
163163
<TestComponent />
164164
</ContextMenuProvider>
165165
);
@@ -174,7 +174,7 @@ describe('useContextMenu', function () {
174174
describe('with nested context menus', function () {
175175
it('shows only parent items when right clicking parent area', function () {
176176
render(
177-
<ContextMenuProvider wrapper={TestMenu}>
177+
<ContextMenuProvider menuWrapper={TestMenu}>
178178
<ParentComponent />
179179
</ContextMenuProvider>
180180
);
@@ -193,7 +193,7 @@ describe('useContextMenu', function () {
193193

194194
it('shows both parent and child items when right clicking child area', function () {
195195
render(
196-
<ContextMenuProvider wrapper={TestMenu}>
196+
<ContextMenuProvider menuWrapper={TestMenu}>
197197
<ParentComponent>
198198
<ChildComponent />
199199
</ParentComponent>
@@ -215,7 +215,7 @@ describe('useContextMenu', function () {
215215
const childOnAction = sinon.spy();
216216

217217
render(
218-
<ContextMenuProvider wrapper={TestMenu}>
218+
<ContextMenuProvider menuWrapper={TestMenu}>
219219
<ParentComponent onAction={parentOnAction}>
220220
<ChildComponent onAction={childOnAction} />
221221
</ParentComponent>
@@ -238,7 +238,7 @@ describe('useContextMenu', function () {
238238
const childOnAction = sinon.spy();
239239

240240
render(
241-
<ContextMenuProvider wrapper={TestMenu}>
241+
<ContextMenuProvider menuWrapper={TestMenu}>
242242
<ParentComponent onAction={parentOnAction}>
243243
<ChildComponent onAction={childOnAction} />
244244
</ParentComponent>

0 commit comments

Comments
 (0)