Skip to content

Commit 150bd7e

Browse files
committed
clean up some todos
1 parent 6bd5270 commit 150bd7e

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

packages/dev/test-utils/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export * from './renderOverride';
1717
export * from './StrictModeWrapper';
1818
export * from './mockImplementation';
1919
export * from './events';
20+
export * from './types';
2021
export * from '@react-spectrum/test-utils';

packages/dev/test-utils/src/types.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright 2024 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
13+
export interface AriaBaseTestProps {
14+
setup?: () => void,
15+
prefix?: string
16+
}

packages/react-aria-components/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import 'client-only';
1616

1717
export {CheckboxContext, ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext, HeadingContext} from './RSPContexts';
1818

19-
// TODO: export the respective contexts here
2019
export {Autocomplete, AutocompleteContext, AutocompleteStateContext, InternalAutocompleteContext} from './Autocomplete';
2120
export {Breadcrumbs, BreadcrumbsContext, Breadcrumb} from './Breadcrumbs';
2221
export {Button, ButtonContext} from './Button';

packages/react-aria-components/test/AriaAutoComplete.test-util.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import {act, render, within} from '@testing-library/react';
1414
import {
15+
AriaBaseTestProps,
1516
mockClickDefault,
1617
pointerMap
1718
} from '@react-spectrum/test-utils-internal';
@@ -25,11 +26,6 @@ import userEvent from '@testing-library/user-event';
2526
// ${'touch'}
2627
// `(`${name} - $interactionType`, tests));
2728

28-
// TODO: place somewhere central?
29-
interface AriaBaseTestProps {
30-
setup?: () => void,
31-
prefix?: string
32-
}
3329

3430
interface RendererArgs {
3531
autocompleteProps?: any,

packages/react-aria-components/test/AriaMenu.test-util.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import {act, fireEvent, render, within} from '@testing-library/react';
1414
import {
15+
AriaBaseTestProps,
1516
pointerMap
1617
} from '@react-spectrum/test-utils-internal';
1718
import {User} from '@react-aria/test-utils';
@@ -41,11 +42,6 @@ describeInteractions.skip = ((name, tests) => describe.skip.each`
4142
`(`${name} - $interactionType`, tests));
4243

4344
let triggerText = 'Menu Button';
44-
45-
interface AriaBaseTestProps {
46-
setup?: () => void,
47-
prefix?: string
48-
}
4945
interface AriaMenuTestProps extends AriaBaseTestProps {
5046
renderers: {
5147
// needs at least three child items, all enabled

packages/react-aria-components/test/AutoComplete.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Adobe. All rights reserved.
2+
* Copyright 2024 Adobe. All rights reserved.
33
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License. You may obtain a copy
55
* of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -10,7 +10,7 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212

13-
import {AriaAutocompleteTests} from './AriaAutoComplete.test-util';
13+
import {AriaAutocompleteTests} from './AriaAutocomplete.test-util';
1414
import {Autocomplete, Header, Input, Label, Menu, MenuItem, MenuSection, SearchField, Separator, Text} from '..';
1515
import React from 'react';
1616
import {render} from '@react-spectrum/test-utils-internal';

0 commit comments

Comments
 (0)