@storybook/test
Advanced tools
Comparing version 0.0.0-pr-24798-sha-f16de2fb to 0.0.0-pr-24948-sha-038ec6fd
import { AsymmetricMatchersContaining, MatchersObject, MatcherState, JestAssertion, ExpectStatic } from '@vitest/expect'; | ||
import * as matchers from '@testing-library/jest-dom/matchers'; | ||
import { MaybeMocked, MaybeMockedDeep, MaybePartiallyMocked, MaybePartiallyMockedDeep } from '@vitest/spy'; | ||
export * from '@vitest/spy'; | ||
export { fn, isMockFunction, spies as mocks, spyOn } from '@vitest/spy'; | ||
import * as _testing_library_user_event_dist_types_setup_directApi from '@testing-library/user-event/dist/types/setup/directApi'; | ||
@@ -35,2 +37,48 @@ import * as _testing_library_user_event_dist_types_setup_setup from '@testing-library/user-event/dist/types/setup/setup'; | ||
/** | ||
* Calls [`.mockClear()`](https://vitest.dev/api/mock#mockclear) on every mocked function. This will only empty `.mock` state, it will not reset implementation. | ||
* | ||
* It is useful if you need to clean up mock between different assertions. | ||
*/ | ||
declare function clearAllMocks(): void; | ||
/** | ||
* 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. | ||
* | ||
* This is useful when you want to completely reset a mock to the default state. | ||
*/ | ||
declare function resetAllMocks(): void; | ||
/** | ||
* Calls [`.mockRestore()`](https://vitest.dev/api/mock#mockrestore) on every mocked function. This will restore all original implementations. | ||
*/ | ||
declare function restoreAllMocks(): void; | ||
/** | ||
* Type helper for TypeScript. Just returns the object that was passed. | ||
* | ||
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that | ||
* 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. | ||
* | ||
* @param item Anything that can be mocked | ||
* @param deep If the object is deeply mocked | ||
* @param options If the object is partially or deeply mocked | ||
*/ | ||
declare function mocked<T>(item: T, deep?: false): MaybeMocked<T>; | ||
declare function mocked<T>(item: T, deep: true): MaybeMockedDeep<T>; | ||
declare function mocked<T>(item: T, options: { | ||
partial?: false; | ||
deep?: false; | ||
}): MaybeMocked<T>; | ||
declare function mocked<T>(item: T, options: { | ||
partial?: false; | ||
deep: true; | ||
}): MaybeMockedDeep<T>; | ||
declare function mocked<T>(item: T, options: { | ||
partial: true; | ||
deep?: false; | ||
}): MaybePartiallyMocked<T>; | ||
declare function mocked<T>(item: T, options: { | ||
partial: true; | ||
deep: true; | ||
}): MaybePartiallyMockedDeep<T>; | ||
declare function mocked<T>(item: T): MaybeMocked<T>; | ||
declare const buildQueries: typeof domTestingLibrary.buildQueries; | ||
@@ -130,2 +178,2 @@ declare const configure: typeof domTestingLibrary.configure; | ||
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 }; | ||
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 }; |
{ | ||
"name": "@storybook/test", | ||
"version": "0.0.0-pr-24798-sha-f16de2fb", | ||
"version": "0.0.0-pr-24948-sha-038ec6fd", | ||
"description": "", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"sideEffects": true, | ||
"exports": { | ||
@@ -43,10 +43,10 @@ ".": { | ||
"scripts": { | ||
"check": "../../../scripts/prepare/check.ts", | ||
"prep": "../../../scripts/prepare/bundle.ts" | ||
"check": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/check.ts", | ||
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" | ||
}, | ||
"dependencies": { | ||
"@storybook/client-logger": "0.0.0-pr-24798-sha-f16de2fb", | ||
"@storybook/core-events": "0.0.0-pr-24798-sha-f16de2fb", | ||
"@storybook/instrumenter": "0.0.0-pr-24798-sha-f16de2fb", | ||
"@storybook/preview-api": "0.0.0-pr-24798-sha-f16de2fb", | ||
"@storybook/client-logger": "0.0.0-pr-24948-sha-038ec6fd", | ||
"@storybook/core-events": "0.0.0-pr-24948-sha-038ec6fd", | ||
"@storybook/instrumenter": "0.0.0-pr-24948-sha-038ec6fd", | ||
"@storybook/preview-api": "0.0.0-pr-24948-sha-038ec6fd", | ||
"@testing-library/dom": "^9.3.1", | ||
@@ -53,0 +53,0 @@ "@testing-library/jest-dom": "^6.1.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1584843
6384
+ Added@storybook/channels@0.0.0-pr-24948-sha-038ec6fd(transitive)
+ Added@storybook/client-logger@0.0.0-pr-24948-sha-038ec6fd(transitive)
+ Added@storybook/core-events@0.0.0-pr-24948-sha-038ec6fd(transitive)
+ Added@storybook/csf@0.1.2-next.0(transitive)
+ Added@storybook/instrumenter@0.0.0-pr-24948-sha-038ec6fd(transitive)
+ Added@storybook/preview-api@0.0.0-pr-24948-sha-038ec6fd(transitive)
+ Added@storybook/types@0.0.0-pr-24948-sha-038ec6fd(transitive)
- Removed@storybook/channels@0.0.0-pr-24798-sha-f16de2fb(transitive)
- Removed@storybook/client-logger@0.0.0-pr-24798-sha-f16de2fb(transitive)
- Removed@storybook/core-events@0.0.0-pr-24798-sha-f16de2fb(transitive)
- Removed@storybook/csf@0.1.11(transitive)
- Removed@storybook/instrumenter@0.0.0-pr-24798-sha-f16de2fb(transitive)
- Removed@storybook/preview-api@0.0.0-pr-24798-sha-f16de2fb(transitive)
- Removed@storybook/types@0.0.0-pr-24798-sha-f16de2fb(transitive)