@storybook/test 8.4.0-alpha.7 → 8.4.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -183,5 +183,5 @@ Unable to find an `+(hidden===!1?"accessible ":"")+'element with the role "'+rol
183
183
  `).map(function(str,i2){return i2===0?str:""+endentation+str}).join(`
184
184
  `)),string+=indentedValue+strings[i+1]}),string}var esm_default=dedent;var testingLibrary=(0,import_instrumenter.instrument)({...dom_esm_exports},{intercept:(method,path)=>path[0]==="fireEvent"||method.startsWith("find")||method.startsWith("waitFor")});testingLibrary.screen=new Proxy(testingLibrary.screen,{get(target,prop,receiver){return import_client_logger.once.warn(esm_default`
185
185
  You are using Testing Library's \`screen\` object. Use \`within(canvasElement)\` instead.
186
- More info: https://storybook.js.org/docs/react/essentials/interactions
186
+ More info: https://storybook.js.org/docs/essentials/interactions
187
187
  `),Reflect.get(target,prop,receiver)}});var{buildQueries:buildQueries2,configure:configure2,createEvent:createEvent3,fireEvent:fireEvent2,findAllByAltText:findAllByAltText2,findAllByDisplayValue:findAllByDisplayValue2,findAllByLabelText:findAllByLabelText2,findAllByPlaceholderText:findAllByPlaceholderText2,findAllByRole:findAllByRole2,findAllByTestId:findAllByTestId2,findAllByText:findAllByText2,findAllByTitle:findAllByTitle2,findByAltText:findByAltText2,findByDisplayValue:findByDisplayValue2,findByLabelText:findByLabelText2,findByPlaceholderText:findByPlaceholderText2,findByRole:findByRole2,findByTestId:findByTestId2,findByText:findByText2,findByTitle:findByTitle2,getAllByAltText:getAllByAltText2,getAllByDisplayValue:getAllByDisplayValue2,getAllByLabelText:getAllByLabelText2,getAllByPlaceholderText:getAllByPlaceholderText2,getAllByRole:getAllByRole2,getAllByTestId:getAllByTestId2,getAllByText:getAllByText2,getAllByTitle:getAllByTitle2,getByAltText:getByAltText2,getByDisplayValue:getByDisplayValue2,getByLabelText:getByLabelText2,getByPlaceholderText:getByPlaceholderText2,getByRole:getByRole2,getByTestId:getByTestId2,getByText:getByText2,getByTitle:getByTitle2,getConfig:getConfig3,getDefaultNormalizer:getDefaultNormalizer2,getElementError:getElementError2,getNodeText:getNodeText2,getQueriesForElement:getQueriesForElement2,getRoles:getRoles2,getSuggestedQuery:getSuggestedQuery2,isInaccessible:isInaccessible2,logDOM:logDOM2,logRoles:logRoles2,prettyDOM:prettyDOM2,queries:queries2,queryAllByAltText:queryAllByAltText2,queryAllByAttribute:queryAllByAttribute2,queryAllByDisplayValue:queryAllByDisplayValue2,queryAllByLabelText:queryAllByLabelText2,queryAllByPlaceholderText:queryAllByPlaceholderText2,queryAllByRole:queryAllByRole2,queryAllByTestId:queryAllByTestId2,queryAllByText:queryAllByText2,queryAllByTitle:queryAllByTitle2,queryByAltText:queryByAltText2,queryByAttribute:queryByAttribute2,queryByDisplayValue:queryByDisplayValue2,queryByLabelText:queryByLabelText2,queryByPlaceholderText:queryByPlaceholderText2,queryByRole:queryByRole2,queryByTestId:queryByTestId2,queryByText:queryByText2,queryByTitle:queryByTitle2,queryHelpers:queryHelpers2,screen:screen2,waitFor:waitFor2,waitForElementToBeRemoved:waitForElementToBeRemoved2,within,prettyFormat:prettyFormat2}=testingLibrary,{userEvent:userEvent2}=(0,import_instrumenter.instrument)({userEvent},{intercept:!0});var{expect:expect3}=(0,import_instrumenter2.instrument)({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks()},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k2,v]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k2)?.writable&&(value[k2]=traverseArgs(v,depth,k2));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs)},enhanceContext=context=>{globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement&&(context.canvas=within(context.canvasElement))};import_global.global.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];import_global.global.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;0&&(module.exports={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,isMockFunction,logDOM,logRoles,mocked,mocks,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});
package/dist/index.mjs CHANGED
@@ -187,7 +187,7 @@ Unable to find an `+(hidden===!1?"accessible ":"")+'element with the role "'+rol
187
187
  `).map(function(str,i2){return i2===0?str:""+endentation+str}).join(`
188
188
  `)),string+=indentedValue+strings[i+1];}),string}var esm_default=dedent;var testingLibrary=instrument({...dom_esm_exports},{intercept:(method,path)=>path[0]==="fireEvent"||method.startsWith("find")||method.startsWith("waitFor")});testingLibrary.screen=new Proxy(testingLibrary.screen,{get(target,prop,receiver){return once.warn(esm_default`
189
189
  You are using Testing Library's \`screen\` object. Use \`within(canvasElement)\` instead.
190
- More info: https://storybook.js.org/docs/react/essentials/interactions
190
+ More info: https://storybook.js.org/docs/essentials/interactions
191
191
  `),Reflect.get(target,prop,receiver)}});var {buildQueries:buildQueries2,configure:configure2,createEvent:createEvent3,fireEvent:fireEvent2,findAllByAltText:findAllByAltText2,findAllByDisplayValue:findAllByDisplayValue2,findAllByLabelText:findAllByLabelText2,findAllByPlaceholderText:findAllByPlaceholderText2,findAllByRole:findAllByRole2,findAllByTestId:findAllByTestId2,findAllByText:findAllByText2,findAllByTitle:findAllByTitle2,findByAltText:findByAltText2,findByDisplayValue:findByDisplayValue2,findByLabelText:findByLabelText2,findByPlaceholderText:findByPlaceholderText2,findByRole:findByRole2,findByTestId:findByTestId2,findByText:findByText2,findByTitle:findByTitle2,getAllByAltText:getAllByAltText2,getAllByDisplayValue:getAllByDisplayValue2,getAllByLabelText:getAllByLabelText2,getAllByPlaceholderText:getAllByPlaceholderText2,getAllByRole:getAllByRole2,getAllByTestId:getAllByTestId2,getAllByText:getAllByText2,getAllByTitle:getAllByTitle2,getByAltText:getByAltText2,getByDisplayValue:getByDisplayValue2,getByLabelText:getByLabelText2,getByPlaceholderText:getByPlaceholderText2,getByRole:getByRole2,getByTestId:getByTestId2,getByText:getByText2,getByTitle:getByTitle2,getConfig:getConfig3,getDefaultNormalizer:getDefaultNormalizer2,getElementError:getElementError2,getNodeText:getNodeText2,getQueriesForElement:getQueriesForElement2,getRoles:getRoles2,getSuggestedQuery:getSuggestedQuery2,isInaccessible:isInaccessible2,logDOM:logDOM2,logRoles:logRoles2,prettyDOM:prettyDOM2,queries:queries2,queryAllByAltText:queryAllByAltText2,queryAllByAttribute:queryAllByAttribute2,queryAllByDisplayValue:queryAllByDisplayValue2,queryAllByLabelText:queryAllByLabelText2,queryAllByPlaceholderText:queryAllByPlaceholderText2,queryAllByRole:queryAllByRole2,queryAllByTestId:queryAllByTestId2,queryAllByText:queryAllByText2,queryAllByTitle:queryAllByTitle2,queryByAltText:queryByAltText2,queryByAttribute:queryByAttribute2,queryByDisplayValue:queryByDisplayValue2,queryByLabelText:queryByLabelText2,queryByPlaceholderText:queryByPlaceholderText2,queryByRole:queryByRole2,queryByTestId:queryByTestId2,queryByText:queryByText2,queryByTitle:queryByTitle2,queryHelpers:queryHelpers2,screen:screen2,waitFor:waitFor2,waitForElementToBeRemoved:waitForElementToBeRemoved2,within,prettyFormat:prettyFormat2}=testingLibrary,{userEvent:userEvent2}=instrument({userEvent},{intercept:!0});var {expect:expect3}=instrument({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks();},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k2,v]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k2)?.writable&&(value[k2]=traverseArgs(v,depth,k2));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs);},enhanceContext=context=>{globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement&&(context.canvas=within(context.canvasElement));};global$1.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];global$1.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;
192
192
 
193
193
  export { buildQueries2 as buildQueries, clearAllMocks, configure2 as configure, createEvent3 as createEvent, expect3 as expect, findAllByAltText2 as findAllByAltText, findAllByDisplayValue2 as findAllByDisplayValue, findAllByLabelText2 as findAllByLabelText, findAllByPlaceholderText2 as findAllByPlaceholderText, findAllByRole2 as findAllByRole, findAllByTestId2 as findAllByTestId, findAllByText2 as findAllByText, findAllByTitle2 as findAllByTitle, findByAltText2 as findByAltText, findByDisplayValue2 as findByDisplayValue, findByLabelText2 as findByLabelText, findByPlaceholderText2 as findByPlaceholderText, findByRole2 as findByRole, findByTestId2 as findByTestId, findByText2 as findByText, findByTitle2 as findByTitle, fireEvent2 as fireEvent, fn2 as fn, getAllByAltText2 as getAllByAltText, getAllByDisplayValue2 as getAllByDisplayValue, getAllByLabelText2 as getAllByLabelText, getAllByPlaceholderText2 as getAllByPlaceholderText, getAllByRole2 as getAllByRole, getAllByTestId2 as getAllByTestId, getAllByText2 as getAllByText, getAllByTitle2 as getAllByTitle, getByAltText2 as getByAltText, getByDisplayValue2 as getByDisplayValue, getByLabelText2 as getByLabelText, getByPlaceholderText2 as getByPlaceholderText, getByRole2 as getByRole, getByTestId2 as getByTestId, getByText2 as getByText, getByTitle2 as getByTitle, getConfig3 as getConfig, getDefaultNormalizer2 as getDefaultNormalizer, getElementError2 as getElementError, getNodeText2 as getNodeText, getQueriesForElement2 as getQueriesForElement, getRoles2 as getRoles, getSuggestedQuery2 as getSuggestedQuery, isInaccessible2 as isInaccessible, isMockFunction, logDOM2 as logDOM, logRoles2 as logRoles, mocked, mocks, onMockCall, prettyDOM2 as prettyDOM, prettyFormat2 as prettyFormat, queries2 as queries, queryAllByAltText2 as queryAllByAltText, queryAllByAttribute2 as queryAllByAttribute, queryAllByDisplayValue2 as queryAllByDisplayValue, queryAllByLabelText2 as queryAllByLabelText, queryAllByPlaceholderText2 as queryAllByPlaceholderText, queryAllByRole2 as queryAllByRole, queryAllByTestId2 as queryAllByTestId, queryAllByText2 as queryAllByText, queryAllByTitle2 as queryAllByTitle, queryByAltText2 as queryByAltText, queryByAttribute2 as queryByAttribute, queryByDisplayValue2 as queryByDisplayValue, queryByLabelText2 as queryByLabelText, queryByPlaceholderText2 as queryByPlaceholderText, queryByRole2 as queryByRole, queryByTestId2 as queryByTestId, queryByText2 as queryByText, queryByTitle2 as queryByTitle, queryHelpers2 as queryHelpers, resetAllMocks, restoreAllMocks, screen2 as screen, spyOn2 as spyOn, traverseArgs, userEvent2 as userEvent, waitFor2 as waitFor, waitForElementToBeRemoved2 as waitForElementToBeRemoved, within };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/test",
3
- "version": "8.4.0-alpha.7",
3
+ "version": "8.4.0-beta.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "storybook"
@@ -23,10 +23,9 @@
23
23
  "exports": {
24
24
  ".": {
25
25
  "types": "./dist/index.d.ts",
26
- "import": "./dist/index.mjs",
27
- "require": "./dist/index.js",
28
26
  "node": "./dist/index.js",
29
- "default": "./dist/index.mjs"
27
+ "import": "./dist/index.mjs",
28
+ "require": "./dist/index.js"
30
29
  },
31
30
  "./package.json": "./package.json"
32
31
  },
@@ -46,13 +45,12 @@
46
45
  "dependencies": {
47
46
  "@storybook/csf": "^0.1.11",
48
47
  "@storybook/global": "^5.0.0",
49
- "@storybook/instrumenter": "8.4.0-alpha.7",
48
+ "@storybook/instrumenter": "8.4.0-beta.0",
50
49
  "@testing-library/dom": "10.4.0",
51
50
  "@testing-library/jest-dom": "6.5.0",
52
51
  "@testing-library/user-event": "14.5.2",
53
52
  "@vitest/expect": "2.0.5",
54
- "@vitest/spy": "2.0.5",
55
- "util": "^0.12.4"
53
+ "@vitest/spy": "2.0.5"
56
54
  },
57
55
  "devDependencies": {
58
56
  "chai": "^5.1.1",
@@ -62,7 +60,7 @@
62
60
  "typescript": "^5.3.2"
63
61
  },
64
62
  "peerDependencies": {
65
- "storybook": "^8.4.0-alpha.7"
63
+ "storybook": "^8.4.0-beta.0"
66
64
  },
67
65
  "publishConfig": {
68
66
  "access": "public"
@@ -79,6 +77,9 @@
79
77
  "@vitest/expect",
80
78
  "@vitest/spy",
81
79
  "@vitest/utils"
80
+ ],
81
+ "externals": [
82
+ "util"
82
83
  ]
83
84
  },
84
85
  "gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"