Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/storybook-addon-vis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"storybook": "^10.3.5",
"storybook-addon-tag-badges": "^3.1.0",
"tailwindcss": "^4.1.14",
"tsdown": "^0.19.0",
"tsdown": "^0.22.0",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest-plugin-vis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"storybook": "^10.3.5",
"storybook-addon-tag-badges": "^3.1.0",
"tailwindcss": "^4.1.14",
"tsdown": "^0.19.0",
"tsdown": "^0.22.0",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
Expand Down
2 changes: 2 additions & 0 deletions packages/vitest-plugin-vis/src/client/expect/augment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ declare global {
interface Matchers<R, T> extends ImageSnapshotMatcher {}
}
}

export type { ImageSnapshotMatcher }
2 changes: 2 additions & 0 deletions packages/vitest-plugin-vis/src/client/page/augment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ import type { ToMatchImageSnapshotAction } from './to_match_image_snapshot.ts'
declare module '@vitest/browser/context' {
interface BrowserPage extends HasImageSnapshotAction, ToMatchImageSnapshotAction {}
}

export type { HasImageSnapshotAction, ToMatchImageSnapshotAction }
15 changes: 13 additions & 2 deletions packages/vitest-plugin-vis/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
// `vitest-plugin-vis` provides code that can be used in test files.
import './client/expect/augment.ts'
import './client/page/augment.ts'
import type { ImageSnapshotMatcher } from './client/expect/to_match_image_snapshot.types.ts'
import type { HasImageSnapshotAction } from './client/page/has_image_snapshot.ts'
import type { ToMatchImageSnapshotAction } from './client/page/to_match_image_snapshot.ts'

declare global {
namespace jest {
interface Matchers<R, T> extends ImageSnapshotMatcher {}
}
}

declare module '@vitest/browser/context' {
interface BrowserPage extends HasImageSnapshotAction, ToMatchImageSnapshotAction {}
}

export * from './auto_snapshots/auto_snapshot_options.ts'
export type * from './shared/types.ts'
1 change: 1 addition & 0 deletions packages/vitest-plugin-vis/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export default defineConfig([
tsconfig: 'tsconfig.esm.json',
format: 'esm',
sourcemap: true,
deps: { neverBundle: ['postcss', 'esbuild', 'lightningcss', 'vite'] },
},
])
Loading
Loading