@storybook/test 8.0.0-alpha.8 → 8.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +9 -25
- package/dist/index.js +33 -33
- package/dist/index.mjs +37 -37
- package/package.json +8 -9
package/dist/index.d.ts
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
import { AsymmetricMatchersContaining, MatchersObject, MatcherState, JestAssertion, ExpectStatic } from '@vitest/expect';
|
2
|
-
import
|
2
|
+
import { TestingLibraryMatchers } from '@testing-library/jest-dom/types/matchers';
|
3
3
|
import { MaybeMocked, MaybeMockedDeep, MaybePartiallyMocked, MaybePartiallyMockedDeep } from '@vitest/spy';
|
4
4
|
export * from '@vitest/spy';
|
5
|
-
export { fn, isMockFunction,
|
6
|
-
import * as _testing_library_user_event_dist_types_setup_directApi from '@testing-library/user-event/dist/types/setup/directApi';
|
7
|
-
import * as _testing_library_user_event_dist_types_setup_setup from '@testing-library/user-event/dist/types/setup/setup';
|
5
|
+
export { fn, isMockFunction, mocks, spyOn } from '@vitest/spy';
|
8
6
|
import * as domTestingLibrary from '@testing-library/dom';
|
7
|
+
import _userEvent from '@testing-library/user-event';
|
9
8
|
|
10
9
|
type Promisify<Fn> = Fn extends (...args: infer A) => infer R ? (...args: A) => R extends Promise<any> ? R : Promise<R> : Fn;
|
11
10
|
type PromisifyObject<O> = {
|
12
11
|
[K in keyof O]: Promisify<O[K]>;
|
13
12
|
};
|
14
13
|
|
15
|
-
type Matchers<T> = PromisifyObject<JestAssertion<T>> &
|
14
|
+
type Matchers<T> = PromisifyObject<JestAssertion<T>> & TestingLibraryMatchers<ReturnType<ExpectStatic['stringContaining']>, Promise<void>>;
|
16
15
|
interface Assertion<T> extends Matchers<T> {
|
17
16
|
toHaveBeenCalledOnce(): Promise<void>;
|
18
17
|
toSatisfy<E>(matcher: (value: E) => boolean, message?: string): Promise<void>;
|
@@ -152,26 +151,11 @@ declare const waitFor: typeof domTestingLibrary.waitFor;
|
|
152
151
|
declare const waitForElementToBeRemoved: typeof domTestingLibrary.waitForElementToBeRemoved;
|
153
152
|
declare const within: typeof domTestingLibrary.getQueriesForElement;
|
154
153
|
declare const prettyFormat: typeof domTestingLibrary.prettyFormat;
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
readonly copy: typeof _testing_library_user_event_dist_types_setup_directApi.copy;
|
160
|
-
readonly cut: typeof _testing_library_user_event_dist_types_setup_directApi.cut;
|
161
|
-
readonly dblClick: typeof _testing_library_user_event_dist_types_setup_directApi.dblClick;
|
162
|
-
readonly deselectOptions: typeof _testing_library_user_event_dist_types_setup_directApi.deselectOptions;
|
163
|
-
readonly hover: typeof _testing_library_user_event_dist_types_setup_directApi.hover;
|
164
|
-
readonly keyboard: typeof _testing_library_user_event_dist_types_setup_directApi.keyboard;
|
165
|
-
readonly pointer: typeof _testing_library_user_event_dist_types_setup_directApi.pointer;
|
166
|
-
readonly paste: typeof _testing_library_user_event_dist_types_setup_directApi.paste;
|
167
|
-
readonly selectOptions: typeof _testing_library_user_event_dist_types_setup_directApi.selectOptions;
|
168
|
-
readonly tripleClick: typeof _testing_library_user_event_dist_types_setup_directApi.tripleClick;
|
169
|
-
readonly type: typeof _testing_library_user_event_dist_types_setup_directApi.type;
|
170
|
-
readonly unhover: typeof _testing_library_user_event_dist_types_setup_directApi.unhover;
|
171
|
-
readonly upload: typeof _testing_library_user_event_dist_types_setup_directApi.upload;
|
172
|
-
readonly tab: typeof _testing_library_user_event_dist_types_setup_directApi.tab;
|
173
|
-
};
|
154
|
+
type _UserEvent = typeof _userEvent;
|
155
|
+
interface UserEvent extends _UserEvent {
|
156
|
+
}
|
157
|
+
declare const userEvent: UserEvent;
|
174
158
|
|
175
159
|
declare const expect: Expect;
|
176
160
|
|
177
|
-
export { buildQueries, clearAllMocks, configure, createEvent, expect, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getConfig, getDefaultNormalizer, getElementError, getNodeText, getQueriesForElement, getRoles, getSuggestedQuery, isInaccessible, logDOM, logRoles, mocked, prettyDOM, prettyFormat, queries, queryAllByAltText, queryAllByAttribute, queryAllByDisplayValue, queryAllByLabelText, queryAllByPlaceholderText, queryAllByRole, queryAllByTestId, queryAllByText, queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, resetAllMocks, restoreAllMocks, screen, userEvent, waitFor, waitForElementToBeRemoved, within };
|
161
|
+
export { UserEvent, buildQueries, clearAllMocks, configure, createEvent, expect, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getConfig, getDefaultNormalizer, getElementError, getNodeText, getQueriesForElement, getRoles, getSuggestedQuery, isInaccessible, logDOM, logRoles, mocked, prettyDOM, prettyFormat, queries, queryAllByAltText, queryAllByAttribute, queryAllByDisplayValue, queryAllByLabelText, queryAllByPlaceholderText, queryAllByRole, queryAllByTestId, queryAllByText, queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, resetAllMocks, restoreAllMocks, screen, userEvent, waitFor, waitForElementToBeRemoved, within };
|