storybook-addon-vis 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/index.d.ts +2 -3
  2. package/dist/index.js +1 -4
  3. package/dist/index.js.map +1 -1
  4. package/dist/manager.js +1 -4
  5. package/dist/preset.cjs +1 -6
  6. package/dist/preset.cjs.map +1 -1
  7. package/dist/preview.js +1 -4
  8. package/dist/vitest-plugin.d.ts +29 -0
  9. package/dist/vitest-plugin.js +1 -7
  10. package/dist/vitest-plugin.js.map +1 -1
  11. package/dist/vitest-setup.js +171 -179
  12. package/dist/vitest-setup.js.map +1 -1
  13. package/manager.js +1 -1
  14. package/package.json +15 -23
  15. package/src/@vitest/browser/context.spec.ts +11 -0
  16. package/src/@vitest/browser/context.stories.tsx +14 -0
  17. package/src/@vitest/browser/context.ts +85 -0
  18. package/src/@vitest/browser/page.image_snapshot.spec.ts +13 -0
  19. package/src/@vitest/browser/page.image_snapshot.stories.tsx +14 -0
  20. package/src/@vitest/browser/page.image_snapshot.ts +38 -0
  21. package/src/__screenshots__/expect.to_match_image_snapshot.spec.ts/should-fail-when-the-subject-is-the-result-of-page-screenshot---1.png +0 -0
  22. package/src/constants.ts +1 -0
  23. package/src/expect.to_match_image_snapshot.global.spec.ts +3 -0
  24. package/src/expect.to_match_image_snapshot.spec.ts +45 -0
  25. package/src/expect.to_match_image_snapshot.stories.tsx +56 -0
  26. package/src/expect.to_match_image_snapshot.ts +124 -0
  27. package/src/image_data.stories.tsx +34 -0
  28. package/src/image_data.ts +36 -0
  29. package/src/image_snapshot.ts +12 -0
  30. package/src/index.ts +2 -0
  31. package/src/manager.tsx +1 -0
  32. package/src/param.spec.ts +39 -0
  33. package/src/param.ts +61 -0
  34. package/src/preset.ts +1 -0
  35. package/src/preview.ts +1 -0
  36. package/src/state.ts +16 -0
  37. package/src/vitest-plugin/commands/copy_file.ts +11 -0
  38. package/src/vitest-plugin/commands/exist_dir.ts +13 -0
  39. package/src/vitest-plugin/types.ts +28 -0
  40. package/src/vitest-plugin.ts +23 -0
  41. package/src/vitest-setup.spec.ts +14 -0
  42. package/src/vitest-setup.ts +24 -0
package/dist/index.d.ts CHANGED
@@ -57,7 +57,6 @@ declare function defineSnapshotParam(snapshot: SnapshotStoryParam): {
57
57
  snapshot: SnapshotStoryParam;
58
58
  };
59
59
 
60
- declare const imageSnapshotSymbol: unique symbol;
61
60
  declare module '@vitest/browser/context' {
62
61
  interface BrowserPage {
63
62
  imageSnapshot(this: BrowserPage, options?: ImageSnapshotOptions): Promise<ImageSnapshot>;
@@ -71,7 +70,7 @@ type ImageSnapshotOptions = {
71
70
  element?: Element;
72
71
  };
73
72
  type ImageSnapshot = {
74
- type: typeof imageSnapshotSymbol;
73
+ type: symbol;
75
74
  rootDir: string;
76
75
  testfilename: string;
77
76
  snapshotFilename: string;
@@ -82,4 +81,4 @@ type ImageSnapshot = {
82
81
  image: ImageData;
83
82
  };
84
83
 
85
- export { type ImageSnapshot, type ImageSnapshotOptions, type SnapshotProjectParam, type SnapshotStoryParam, defineSnapshotParam, defineSnapshotProjectParam, imageSnapshotSymbol };
84
+ export { type ImageSnapshot, type ImageSnapshotOptions, type SnapshotProjectParam, type SnapshotStoryParam, defineSnapshotParam, defineSnapshotProjectParam };
package/dist/index.js CHANGED
@@ -1,5 +1,2 @@
1
- function t(e){return {snapshot:e}}function n(e){return {snapshot:e}}var o=Symbol("imageSnapshot");
2
-
3
- export { n as defineSnapshotParam, t as defineSnapshotProjectParam, o as imageSnapshotSymbol };
4
- //# sourceMappingURL=index.js.map
1
+ function t(e){return {snapshot:e}}function r(e){return {snapshot:e}}export{r as defineSnapshotParam,t as defineSnapshotProjectParam};//# sourceMappingURL=index.js.map
5
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/param.ts","../src/vitest-plugin/types.ts"],"names":["defineSnapshotProjectParam","snapshot","defineSnapshotParam","imageSnapshotSymbol"],"mappings":"AA8BO,SAASA,CAAAA,CAA2BC,EAAyC,CACnF,OAAO,CAAE,QAAAA,CAAAA,CAAS,CACnB,CA0BO,SAASC,CAAAA,CAAoBD,EAA8B,CACjE,OAAO,CAAE,QAAAA,CAAAA,CAAS,CACnB,CCzDO,IAAME,CAAsB,CAAA,MAAA,CAAO,eAAe","file":"index.js","sourcesContent":["import type { PixelmatchOptions } from 'pixelmatch'\n\n/**\n * The project parameters for the snapshot.\n *\n * These parameters are set per project in the `.storybook/preview.ts` file.\n */\nexport type SnapshotProjectParam = {\n\t/**\n\t * The snapshot folder relative to the root of the project.\n\t */\n\tsnapshotPath: string\n\t/**\n\t * The baseline folder under the snapshot folder specified in `snapshotPath`.\n\t */\n\tbaseline: string\n\t/**\n\t * The result folder under the snapshot folder specified in `snapshotPath`.\n\t *\n\t * This folder stores the snapshot of the current test run.\n\t */\n\tresult: string\n\t/**\n\t * The diff folder under the snapshot folder specified in `snapshotPath`.\n\t *\n\t * This folder stores the diff of the current test run if the test fails.\n\t */\n\tdiff: string\n}\n\nexport function defineSnapshotProjectParam(snapshot: Partial<SnapshotProjectParam>) {\n\treturn { snapshot }\n}\n\nexport type SnapshotStoryParam = {\n\t/**\n\t * Add a delay to the story snapshot comparison to allow for async rendering.\n\t *\n\t * This only apply to the automatic snapshot taken when the story is rendered.\n\t * In general, it's a good idea to not rely on this delay,\n\t * and instead use the make sure your component is fully rendered before the `play()` function returns.\n\t */\n\tdelay?: number | undefined\n\t/**\n\t * The method by which images are compared.\n\t * `pixelmatch` does a pixel by pixel comparison, whereas `ssim` does a structural similarity comparison.\n\t * @default 'pixelmatch'\n\t */\n\tcomparisonMethod?: 'pixelmatch' | 'ssim' | undefined\n\t/**\n\t * Custom config passed to 'pixelmatch' or 'ssim'\n\t */\n\tcustomDiffConfig?: PixelmatchOptions | undefined\n\tfailureThreshold?: number | undefined\n\tfailureThresholdType?: 'percent' | 'pixel' | undefined\n\tblur?: number | undefined\n}\n\nexport function defineSnapshotParam(snapshot: SnapshotStoryParam) {\n\treturn { snapshot }\n}\n","// import type { Locator } from '@vitest/browser/context'\n/// <reference types=\"@vitest/browser/context\" />\n\nexport const imageSnapshotSymbol = Symbol('imageSnapshot')\n\ndeclare module '@vitest/browser/context' {\n\tinterface BrowserPage {\n\t\timageSnapshot(this: BrowserPage, options?: ImageSnapshotOptions): Promise<ImageSnapshot>\n\t}\n\tinterface BrowserCommands {\n\t\texistDir: (path: string) => Promise<boolean>\n\t\tcopyFile: (src: string, dest: string) => Promise<void>\n\t}\n}\n\nexport type ImageSnapshotOptions = {\n\telement?: Element //| Locator\n}\n\nexport type ImageSnapshot = {\n\ttype: typeof imageSnapshotSymbol\n\trootDir: string\n\ttestfilename: string\n\tsnapshotFilename: string\n\tbaselinePath: string\n\tresultPath: string\n\tdiffPath: string\n\tbase64: string\n\timage: ImageData\n}\n"]}
1
+ {"version":3,"sources":["../src/param.ts"],"names":["defineSnapshotProjectParam","snapshot","defineSnapshotParam"],"mappings":"AA8BO,SAASA,EAA2BC,CAAyC,CAAA,CACnF,OAAO,CAAE,SAAAA,CAAS,CACnB,CA0BO,SAASC,EAAoBD,CAA8B,CAAA,CACjE,OAAO,CAAE,QAAA,CAAAA,CAAS,CACnB","file":"index.js","sourcesContent":["import type { PixelmatchOptions } from 'pixelmatch'\n\n/**\n * The project parameters for the snapshot.\n *\n * These parameters are set per project in the `.storybook/preview.ts` file.\n */\nexport type SnapshotProjectParam = {\n\t/**\n\t * The snapshot folder relative to the root of the project.\n\t */\n\tsnapshotPath: string\n\t/**\n\t * The baseline folder under the snapshot folder specified in `snapshotPath`.\n\t */\n\tbaseline: string\n\t/**\n\t * The result folder under the snapshot folder specified in `snapshotPath`.\n\t *\n\t * This folder stores the snapshot of the current test run.\n\t */\n\tresult: string\n\t/**\n\t * The diff folder under the snapshot folder specified in `snapshotPath`.\n\t *\n\t * This folder stores the diff of the current test run if the test fails.\n\t */\n\tdiff: string\n}\n\nexport function defineSnapshotProjectParam(snapshot: Partial<SnapshotProjectParam>) {\n\treturn { snapshot }\n}\n\nexport type SnapshotStoryParam = {\n\t/**\n\t * Add a delay to the story snapshot comparison to allow for async rendering.\n\t *\n\t * This only apply to the automatic snapshot taken when the story is rendered.\n\t * In general, it's a good idea to not rely on this delay,\n\t * and instead use the make sure your component is fully rendered before the `play()` function returns.\n\t */\n\tdelay?: number | undefined\n\t/**\n\t * The method by which images are compared.\n\t * `pixelmatch` does a pixel by pixel comparison, whereas `ssim` does a structural similarity comparison.\n\t * @default 'pixelmatch'\n\t */\n\tcomparisonMethod?: 'pixelmatch' | 'ssim' | undefined\n\t/**\n\t * Custom config passed to 'pixelmatch' or 'ssim'\n\t */\n\tcustomDiffConfig?: PixelmatchOptions | undefined\n\tfailureThreshold?: number | undefined\n\tfailureThresholdType?: 'percent' | 'pixel' | undefined\n\tblur?: number | undefined\n}\n\nexport function defineSnapshotParam(snapshot: SnapshotStoryParam) {\n\treturn { snapshot }\n}\n"]}
package/dist/manager.js CHANGED
@@ -1,5 +1,2 @@
1
- var e={};
2
-
3
- export { e as default };
4
- //# sourceMappingURL=manager.js.map
1
+ var e={};export{e as default};//# sourceMappingURL=manager.js.map
5
2
  //# sourceMappingURL=manager.js.map
package/dist/preset.cjs CHANGED
@@ -1,7 +1,2 @@
1
- 'use strict';
2
-
3
- var e={};
4
-
5
- module.exports = e;
6
- //# sourceMappingURL=preset.cjs.map
1
+ 'use strict';var e={};module.exports=e;//# sourceMappingURL=preset.cjs.map
7
2
  //# sourceMappingURL=preset.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/preset.ts"],"names":["preset_default"],"mappings":";;AAAA,IAAOA,EAAQ","file":"preset.cjs","sourcesContent":["export default {}\n"]}
1
+ {"version":3,"sources":["../src/preset.ts"],"names":["preset_default"],"mappings":"aAAA,IAAOA,EAAQ","file":"preset.cjs","sourcesContent":["export default {}\n"]}
package/dist/preview.js CHANGED
@@ -1,5 +1,2 @@
1
- var e={};
2
-
3
- export { e as default };
4
- //# sourceMappingURL=preview.js.map
1
+ var e={};export{e as default};//# sourceMappingURL=preview.js.map
5
2
  //# sourceMappingURL=preview.js.map
@@ -0,0 +1,29 @@
1
+ import { Plugin } from 'vitest/config';
2
+
3
+ declare module '@vitest/browser/context' {
4
+ interface BrowserPage {
5
+ imageSnapshot(this: BrowserPage, options?: ImageSnapshotOptions): Promise<ImageSnapshot>;
6
+ }
7
+ interface BrowserCommands {
8
+ existDir: (path: string) => Promise<boolean>;
9
+ copyFile: (src: string, dest: string) => Promise<void>;
10
+ }
11
+ }
12
+ type ImageSnapshotOptions = {
13
+ element?: Element;
14
+ };
15
+ type ImageSnapshot = {
16
+ type: symbol;
17
+ rootDir: string;
18
+ testfilename: string;
19
+ snapshotFilename: string;
20
+ baselinePath: string;
21
+ resultPath: string;
22
+ diffPath: string;
23
+ base64: string;
24
+ image: ImageData;
25
+ };
26
+
27
+ declare function storybookVis(): Plugin;
28
+
29
+ export { storybookVis };
@@ -1,8 +1,2 @@
1
- import { stat, copyFile } from 'node:fs/promises';
2
- import { join, dirname } from 'pathe';
3
-
4
- var i=async({testPath:e,provider:t},o)=>{if(t.name==="playwright")return stat(join(dirname(e),o)).then(r=>r.isDirectory()).catch(()=>!1);throw new Error(`provider ${t.name} is not supported`)};var m=async({testPath:e,provider:t},o,r)=>{if(t.name==="playwright")return copyFile(join(dirname(e),o),join(dirname(e),r));throw new Error(`provider ${t.name} is not supported`)};function v(){return {name:"vitest:storybook-vis",config(){return {test:{browser:{name:void 0,commands:{existDir:i,copyFile:m}}}}}}}
5
-
6
- export { v as storybookVis };
7
- //# sourceMappingURL=vitest-plugin.js.map
1
+ import {stat,copyFile}from'node:fs/promises';import {join,dirname}from'pathe';var i=async({testPath:o,provider:r},t)=>{if(r.name==="playwright")return stat(join(dirname(o),t)).then(e=>e.isDirectory()).catch(()=>!1);throw new Error(`provider ${r.name} is not supported`)};var s=async({testPath:o,provider:r},t,e)=>{if(r.name==="playwright")return copyFile(join(dirname(o),t),join(dirname(o),e));throw new Error(`provider ${r.name} is not supported`)};function x(){return {name:"vitest:storybook-vis",config(){return {test:{browser:{name:void 0,commands:{existDir:i,copyFile:s}}}}}}}export{x as storybookVis};//# sourceMappingURL=vitest-plugin.js.map
8
2
  //# sourceMappingURL=vitest-plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vitest-plugin/commands/exist_dir.ts","../src/vitest-plugin/types.ts","../src/vitest-plugin/commands/copy_file.ts","../src/vitest-plugin.ts"],"names":["existDir","testPath","provider","path","stat","join","dirname","s","copyFile","src","dest","copyFileFs","storybookVis"],"mappings":";;;AAIO,IAAMA,CAA2C,CAAA,MAAO,CAAE,QAAAC,CAAAA,CAAAA,CAAU,QAAAC,CAAAA,CAAS,CAAGC,CAAAA,CAAAA,GAAS,CAC/F,GAAID,CAAS,CAAA,IAAA,GAAS,YACrB,CAAA,OAAOE,IAAKC,CAAAA,IAAAA,CAAKC,OAAQL,CAAAA,CAAQ,EAAGE,CAAI,CAAC,CACvC,CAAA,IAAA,CAAMI,CAAMA,EAAAA,CAAAA,CAAE,WAAY,EAAC,CAC3B,CAAA,KAAA,CAAM,IAAM,CAAA,CAAK,CAGpB,CAAA,MAAM,IAAI,KAAA,CAAM,YAAYL,CAAS,CAAA,IAAI,CAAmB,iBAAA,CAAA,CAC7D,CCTO,CCCA,IAAMM,CAAAA,CAAwD,MAAO,CAAE,QAAAP,CAAAA,CAAAA,CAAU,QAAAC,CAAAA,CAAS,CAAGO,CAAAA,CAAAA,CAAKC,CAAS,GAAA,CACjH,GAAIR,CAAAA,CAAS,OAAS,YACrB,CAAA,OAAOS,QAAWN,CAAAA,IAAAA,CAAKC,OAAQL,CAAAA,CAAQ,CAAGQ,CAAAA,CAAG,EAAGJ,IAAKC,CAAAA,OAAAA,CAAQL,CAAQ,CAAA,CAAGS,CAAI,CAAC,CAG9E,CAAA,MAAM,IAAI,KAAM,CAAA,CAAA,SAAA,EAAYR,CAAS,CAAA,IAAI,CAAmB,iBAAA,CAAA,CAC7D,CCLO,CAAA,SAASU,CAAuB,EAAA,CACtC,OAAO,CACN,IAAM,CAAA,sBAAA,CACN,MAAS,EAAA,CACR,OAAO,CACN,IAAA,CAAM,CACL,OAAA,CAAS,CACR,IAAA,CAAM,KACN,CAAA,CAAA,QAAA,CAAU,CACT,QAAAZ,CAAAA,CAAAA,CACA,QAAAQ,CAAAA,CACD,CACD,CACD,CACD,CACD,CACD,CACD","file":"vitest-plugin.js","sourcesContent":["import { stat } from 'node:fs/promises'\nimport { dirname, join } from 'pathe'\nimport type { BrowserCommand } from 'vitest/node'\n\nexport const existDir: BrowserCommand<[path: string]> = async ({ testPath, provider }, path) => {\n\tif (provider.name === 'playwright') {\n\t\treturn stat(join(dirname(testPath), path))\n\t\t\t.then((s) => s.isDirectory())\n\t\t\t.catch(() => false)\n\t}\n\n\tthrow new Error(`provider ${provider.name} is not supported`)\n}\n","// import type { Locator } from '@vitest/browser/context'\n/// <reference types=\"@vitest/browser/context\" />\n\nexport const imageSnapshotSymbol = Symbol('imageSnapshot')\n\ndeclare module '@vitest/browser/context' {\n\tinterface BrowserPage {\n\t\timageSnapshot(this: BrowserPage, options?: ImageSnapshotOptions): Promise<ImageSnapshot>\n\t}\n\tinterface BrowserCommands {\n\t\texistDir: (path: string) => Promise<boolean>\n\t\tcopyFile: (src: string, dest: string) => Promise<void>\n\t}\n}\n\nexport type ImageSnapshotOptions = {\n\telement?: Element //| Locator\n}\n\nexport type ImageSnapshot = {\n\ttype: typeof imageSnapshotSymbol\n\trootDir: string\n\ttestfilename: string\n\tsnapshotFilename: string\n\tbaselinePath: string\n\tresultPath: string\n\tdiffPath: string\n\tbase64: string\n\timage: ImageData\n}\n","import { copyFile as copyFileFs } from 'node:fs/promises'\nimport { dirname, join } from 'pathe'\nimport type { BrowserCommand } from 'vitest/node'\n\nexport const copyFile: BrowserCommand<[src: string, dest: string]> = async ({ testPath, provider }, src, dest) => {\n\tif (provider.name === 'playwright') {\n\t\treturn copyFileFs(join(dirname(testPath), src), join(dirname(testPath), dest))\n\t}\n\n\tthrow new Error(`provider ${provider.name} is not supported`)\n}\n","import type { Plugin } from 'vitest/config'\nimport { existDir } from './vitest-plugin/commands/exist_dir.js'\nimport './vitest-plugin/types.js'\nimport { copyFile } from './vitest-plugin/commands/copy_file.js'\n\nexport function storybookVis(): Plugin {\n\treturn {\n\t\tname: 'vitest:storybook-vis',\n\t\tconfig() {\n\t\t\treturn {\n\t\t\t\ttest: {\n\t\t\t\t\tbrowser: {\n\t\t\t\t\t\tname: undefined,\n\t\t\t\t\t\tcommands: {\n\t\t\t\t\t\t\texistDir,\n\t\t\t\t\t\t\tcopyFile,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../src/vitest-plugin/commands/exist_dir.ts","../src/vitest-plugin/commands/copy_file.ts","../src/vitest-plugin.ts"],"names":["existDir","testPath","provider","path","stat","join","dirname","s","copyFile","src","dest","copyFileFs","storybookVis"],"mappings":"8EAIO,IAAMA,CAA2C,CAAA,MAAO,CAAE,QAAA,CAAAC,CAAU,CAAA,QAAA,CAAAC,CAAS,CAAA,CAAGC,CAAS,GAAA,CAC/F,GAAID,CAAAA,CAAS,IAAS,GAAA,YAAA,CACrB,OAAOE,IAAAA,CAAKC,IAAKC,CAAAA,OAAAA,CAAQL,CAAQ,CAAGE,CAAAA,CAAI,CAAC,CAAA,CACvC,IAAMI,CAAAA,CAAAA,EAAMA,CAAE,CAAA,WAAA,EAAa,CAAA,CAC3B,KAAM,CAAA,IAAM,CAAK,CAAA,CAAA,CAGpB,MAAM,IAAI,MAAM,CAAYL,SAAAA,EAAAA,CAAAA,CAAS,IAAI,CAAA,iBAAA,CAAmB,CAC7D,CAAA,CCRO,IAAMM,CAAwD,CAAA,MAAO,CAAE,QAAA,CAAAP,CAAU,CAAA,QAAA,CAAAC,CAAS,CAAA,CAAGO,CAAKC,CAAAA,CAAAA,GAAS,CACjH,GAAIR,CAAS,CAAA,IAAA,GAAS,YACrB,CAAA,OAAOS,QAAWN,CAAAA,IAAAA,CAAKC,OAAQL,CAAAA,CAAQ,CAAGQ,CAAAA,CAAG,CAAGJ,CAAAA,IAAAA,CAAKC,OAAQL,CAAAA,CAAQ,CAAGS,CAAAA,CAAI,CAAC,CAAA,CAG9E,MAAM,IAAI,MAAM,CAAYR,SAAAA,EAAAA,CAAAA,CAAS,IAAI,CAAA,iBAAA,CAAmB,CAC7D,CAAA,CCLO,SAASU,CAAAA,EAAuB,CACtC,OAAO,CACN,IAAA,CAAM,sBACN,CAAA,MAAA,EAAS,CACR,OAAO,CACN,IAAM,CAAA,CACL,OAAS,CAAA,CACR,IAAM,CAAA,KAAA,CAAA,CACN,QAAU,CAAA,CACT,QAAAZ,CAAAA,CAAAA,CACA,QAAAQ,CAAAA,CACD,CACD,CACD,CACD,CACD,CACD,CACD","file":"vitest-plugin.js","sourcesContent":["import { stat } from 'node:fs/promises'\nimport { dirname, join } from 'pathe'\nimport type { BrowserCommand } from 'vitest/node'\n\nexport const existDir: BrowserCommand<[path: string]> = async ({ testPath, provider }, path) => {\n\tif (provider.name === 'playwright') {\n\t\treturn stat(join(dirname(testPath), path))\n\t\t\t.then((s) => s.isDirectory())\n\t\t\t.catch(() => false)\n\t}\n\n\tthrow new Error(`provider ${provider.name} is not supported`)\n}\n","import { copyFile as copyFileFs } from 'node:fs/promises'\nimport { dirname, join } from 'pathe'\nimport type { BrowserCommand } from 'vitest/node'\n\nexport const copyFile: BrowserCommand<[src: string, dest: string]> = async ({ testPath, provider }, src, dest) => {\n\tif (provider.name === 'playwright') {\n\t\treturn copyFileFs(join(dirname(testPath), src), join(dirname(testPath), dest))\n\t}\n\n\tthrow new Error(`provider ${provider.name} is not supported`)\n}\n","import type { Plugin } from 'vitest/config'\nimport { existDir } from './vitest-plugin/commands/exist_dir.js'\nimport './vitest-plugin/types.js'\nimport { copyFile } from './vitest-plugin/commands/copy_file.js'\n\nexport function storybookVis(): Plugin {\n\treturn {\n\t\tname: 'vitest:storybook-vis',\n\t\tconfig() {\n\t\t\treturn {\n\t\t\t\ttest: {\n\t\t\t\t\tbrowser: {\n\t\t\t\t\t\tname: undefined,\n\t\t\t\t\t\tcommands: {\n\t\t\t\t\t\t\texistDir,\n\t\t\t\t\t\t\tcopyFile,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n}\n"]}