@storybook/test 0.0.0-pr-24948-sha-038ec6fd → 0.0.0-pr-22236-sha-107ce09c
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +1 -49
- package/dist/index.js +6 -6
- package/dist/index.mjs +9 -7
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
import { AsymmetricMatchersContaining, MatchersObject, MatcherState, JestAssertion, ExpectStatic } from '@vitest/expect';
|
2
2
|
import * as matchers from '@testing-library/jest-dom/matchers';
|
3
|
-
import { MaybeMocked, MaybeMockedDeep, MaybePartiallyMocked, MaybePartiallyMockedDeep } from '@vitest/spy';
|
4
3
|
export * from '@vitest/spy';
|
5
|
-
export { fn, isMockFunction, spies as mocks, spyOn } from '@vitest/spy';
|
6
4
|
import * as _testing_library_user_event_dist_types_setup_directApi from '@testing-library/user-event/dist/types/setup/directApi';
|
7
5
|
import * as _testing_library_user_event_dist_types_setup_setup from '@testing-library/user-event/dist/types/setup/setup';
|
8
6
|
import * as domTestingLibrary from '@testing-library/dom';
|
@@ -34,52 +32,6 @@ interface Expect extends AsymmetricMatchersContaining {
|
|
34
32
|
not: AsymmetricMatchersContaining;
|
35
33
|
}
|
36
34
|
|
37
|
-
/**
|
38
|
-
* Calls [`.mockClear()`](https://vitest.dev/api/mock#mockclear) on every mocked function. This will only empty `.mock` state, it will not reset implementation.
|
39
|
-
*
|
40
|
-
* It is useful if you need to clean up mock between different assertions.
|
41
|
-
*/
|
42
|
-
declare function clearAllMocks(): void;
|
43
|
-
/**
|
44
|
-
* Calls [`.mockReset()`](https://vitest.dev/api/mock#mockreset) on every mocked function. This will empty `.mock` state, reset "once" implementations and force the base implementation to return `undefined` when invoked.
|
45
|
-
*
|
46
|
-
* This is useful when you want to completely reset a mock to the default state.
|
47
|
-
*/
|
48
|
-
declare function resetAllMocks(): void;
|
49
|
-
/**
|
50
|
-
* Calls [`.mockRestore()`](https://vitest.dev/api/mock#mockrestore) on every mocked function. This will restore all original implementations.
|
51
|
-
*/
|
52
|
-
declare function restoreAllMocks(): void;
|
53
|
-
/**
|
54
|
-
* Type helper for TypeScript. Just returns the object that was passed.
|
55
|
-
*
|
56
|
-
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that
|
57
|
-
* the first level values are mocked. You can pass down `{ deep: true }` as a second argument to tell TypeScript that the whole object is mocked, if it actually is.
|
58
|
-
*
|
59
|
-
* @param item Anything that can be mocked
|
60
|
-
* @param deep If the object is deeply mocked
|
61
|
-
* @param options If the object is partially or deeply mocked
|
62
|
-
*/
|
63
|
-
declare function mocked<T>(item: T, deep?: false): MaybeMocked<T>;
|
64
|
-
declare function mocked<T>(item: T, deep: true): MaybeMockedDeep<T>;
|
65
|
-
declare function mocked<T>(item: T, options: {
|
66
|
-
partial?: false;
|
67
|
-
deep?: false;
|
68
|
-
}): MaybeMocked<T>;
|
69
|
-
declare function mocked<T>(item: T, options: {
|
70
|
-
partial?: false;
|
71
|
-
deep: true;
|
72
|
-
}): MaybeMockedDeep<T>;
|
73
|
-
declare function mocked<T>(item: T, options: {
|
74
|
-
partial: true;
|
75
|
-
deep?: false;
|
76
|
-
}): MaybePartiallyMocked<T>;
|
77
|
-
declare function mocked<T>(item: T, options: {
|
78
|
-
partial: true;
|
79
|
-
deep: true;
|
80
|
-
}): MaybePartiallyMockedDeep<T>;
|
81
|
-
declare function mocked<T>(item: T): MaybeMocked<T>;
|
82
|
-
|
83
35
|
declare const buildQueries: typeof domTestingLibrary.buildQueries;
|
84
36
|
declare const configure: typeof domTestingLibrary.configure;
|
85
37
|
declare const createEvent: domTestingLibrary.CreateObject & domTestingLibrary.CreateFunction;
|
@@ -174,4 +126,4 @@ declare const userEvent: {
|
|
174
126
|
|
175
127
|
declare const expect: Expect;
|
176
128
|
|
177
|
-
export { buildQueries,
|
129
|
+
export { buildQueries, 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, prettyDOM, prettyFormat, queries, queryAllByAltText, queryAllByAttribute, queryAllByDisplayValue, queryAllByLabelText, queryAllByPlaceholderText, queryAllByRole, queryAllByTestId, queryAllByText, queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, screen, userEvent, waitFor, waitForElementToBeRemoved, within };
|