UNPKG

storybook-addon-vis-v9-fix-test

Version:
33 lines (28 loc) 914 B
import { getCurrentTest, commands } from './chunk-YYPWZMMD.js'; export { isSnapshotEnabled } from './chunk-YYPWZMMD.js'; export * from 'vitest-plugin-vis'; import { hasImageSnapshotAction, toTaskId } from 'vitest-plugin-vis/client-api'; // src/client/ctx.ts var ctx = { getCurrentTest, __test__reset() { ctx.getCurrentTest = getCurrentTest; } }; // src/client/has_image_snapshot.ts function hasImageSnapshot(options) { const test = ctx.getCurrentTest(); if (!test) return false; return hasImageSnapshotAction(commands, toTaskId(test), options); } // src/client/storybook/param.ts function defineAutoSnapshotParam(snapshot) { return { snapshot }; } // src/server/vis_options.ts function defineStorybookVisOptions(options) { return options; } export { defineAutoSnapshotParam, defineStorybookVisOptions, hasImageSnapshot }; //# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map