@storybook/test 8.1.0-alpha.6 → 8.1.0-alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +9 -3
- package/dist/index.js +15 -15
- package/dist/index.mjs +14 -14
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { AsymmetricMatchersContaining, MatchersObject, MatcherState, JestAssertion, ExpectStatic } from '@vitest/expect';
|
2
2
|
import { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
|
3
|
-
import { MaybeMocked, MaybeMockedDeep, MaybePartiallyMocked, MaybePartiallyMockedDeep } from '@vitest/spy';
|
3
|
+
import { spyOn as spyOn$1, fn as fn$1, MaybeMocked, MaybeMockedDeep, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
4
4
|
export * from '@vitest/spy';
|
5
|
-
export {
|
5
|
+
export { isMockFunction, mocks } from '@vitest/spy';
|
6
6
|
import * as domTestingLibrary from '@testing-library/dom';
|
7
7
|
import _userEvent from '@testing-library/user-event';
|
8
8
|
|
@@ -33,6 +33,10 @@ interface Expect extends AsymmetricMatchersContaining {
|
|
33
33
|
not: AsymmetricMatchersContaining;
|
34
34
|
}
|
35
35
|
|
36
|
+
type Listener = (mock: MockInstance, args: unknown[]) => void;
|
37
|
+
declare function onMockCall(callback: Listener): () => void;
|
38
|
+
declare const spyOn: typeof spyOn$1;
|
39
|
+
declare const fn: typeof fn$1;
|
36
40
|
/**
|
37
41
|
* Calls [`.mockClear()`](https://vitest.dev/api/mock#mockclear) on every mocked function. This will only empty `.mock` state, it will not reset implementation.
|
38
42
|
*
|
@@ -158,4 +162,6 @@ declare const userEvent: UserEvent;
|
|
158
162
|
|
159
163
|
declare const expect: Expect;
|
160
164
|
|
161
|
-
|
165
|
+
declare const traverseArgs: (value: unknown, depth?: number, key?: string) => unknown;
|
166
|
+
|
167
|
+
export { UserEvent, buildQueries, clearAllMocks, configure, createEvent, expect, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, fn, 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, onMockCall, 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, spyOn, traverseArgs, userEvent, waitFor, waitForElementToBeRemoved, within };
|