@chromatic-com/vitest 1.0.0 → 1.0.2
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.
- package/dist/archive-storybook-Bqn7D3Ez.mjs +55 -0
- package/dist/bin/archive-storybook.mjs +47 -0
- package/dist/bin/build-archive-storybook.mjs +65 -0
- package/dist/constants-Dos4OOMt.mjs +68 -0
- package/dist/{index.d.ts → index.d.mts} +48 -42
- package/dist/index.mjs +44 -0
- package/dist/plugin.d.mts +102 -0
- package/dist/plugin.mjs +2604 -0
- package/dist/setupFile.mjs +66 -0
- package/dist/storybook-config/main.mjs +62 -0
- package/dist/storybook-config/manager.mjs +12 -0
- package/dist/storybook-config/preview.mjs +113 -0
- package/dist/telemetry-DOABfuU5.mjs +320 -0
- package/dist/telemetry-sender.mjs +14 -0
- package/dist/waitForIdleNetwork-CEON19Zg.mjs +193 -0
- package/package.json +31 -26
- package/dist/bin/archive-storybook.d.ts +0 -1
- package/dist/bin/archive-storybook.js +0 -368
- package/dist/bin/build-archive-storybook.d.ts +0 -1
- package/dist/bin/build-archive-storybook.js +0 -383
- package/dist/index.js +0 -250
- package/dist/plugin.d.ts +0 -99
- package/dist/plugin.js +0 -2148
- package/dist/setupFile.d.ts +0 -2
- package/dist/setupFile.js +0 -287
- package/dist/storybook-config/main.d.ts +0 -5
- package/dist/storybook-config/main.js +0 -88
- package/dist/storybook-config/manager.d.ts +0 -2
- package/dist/storybook-config/manager.js +0 -14
- package/dist/storybook-config/preview.d.ts +0 -17
- package/dist/storybook-config/preview.js +0 -138
package/dist/plugin.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Vite } from 'vitest/node';
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
FontFace: typeof FontFace;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ChromaticConfig {
|
|
10
|
-
/** https://www.chromatic.com/docs/delay/ */
|
|
11
|
-
delay?: number;
|
|
12
|
-
/** https://www.chromatic.com/docs/threshold/#anti-aliasing */
|
|
13
|
-
diffIncludeAntiAliasing?: boolean;
|
|
14
|
-
/** https://www.chromatic.com/docs/threshold/#setting-the-threshold */
|
|
15
|
-
diffThreshold?: number;
|
|
16
|
-
/** Disable the capture that happens automatically at the end of a test when using the Chromatic test fixture */
|
|
17
|
-
disableAutoSnapshot?: boolean;
|
|
18
|
-
/** https://www.chromatic.com/docs/media-features/#test-high-contrast-color-schemes */
|
|
19
|
-
forcedColors?: string;
|
|
20
|
-
/** https://www.chromatic.com/docs/animations/#css-animations */
|
|
21
|
-
pauseAnimationAtEnd?: boolean;
|
|
22
|
-
/** https://www.chromatic.com/docs/media-features/#verify-reduced-motion-animations */
|
|
23
|
-
prefersReducedMotion?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Specify a network timeout, in milliseconds. This is the maximum amount of time that
|
|
26
|
-
* each test will wait for the network to be idle while archiving resources.
|
|
27
|
-
*/
|
|
28
|
-
resourceArchiveTimeout?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Domains (besides where the test is being run from) that assets should be archived from
|
|
31
|
-
* (needed when, for example, CI environment can't access the archives later on)
|
|
32
|
-
* ex: www.some-domain.com
|
|
33
|
-
*/
|
|
34
|
-
assetDomains?: string[];
|
|
35
|
-
/** Crop snapshots to the viewport size. */
|
|
36
|
-
cropToViewport?: boolean;
|
|
37
|
-
/** CSS selectors of elements to ignore when comparing snapshots. */
|
|
38
|
-
ignoreSelectors?: string[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Options for the Chromatic Vitest plugin
|
|
43
|
-
*/
|
|
44
|
-
interface Options extends ChromaticConfig {
|
|
45
|
-
/**
|
|
46
|
-
* Tags used to register tests for visual regression tracking.
|
|
47
|
-
* If specified, only tests with at least one matching tag will be registered for visual regression tracking.
|
|
48
|
-
* Tests without any of the specified tags will be ignored and won't have snapshots taken, even if `disableAutoSnapshot` is false.
|
|
49
|
-
*
|
|
50
|
-
* @default none (all tests are registered)
|
|
51
|
-
*/
|
|
52
|
-
tags?: string[];
|
|
53
|
-
/**
|
|
54
|
-
* Directory where temporary archives and snapshots will be stored.
|
|
55
|
-
* Relative to the project [the project `root`](https://vitest.dev/config/root.html#root).
|
|
56
|
-
*
|
|
57
|
-
* Defaults to `.vitest/chromatic`.
|
|
58
|
-
*/
|
|
59
|
-
outputDirectory?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Time in milliseconds to determine whether network is idle.
|
|
62
|
-
* The network is considered idle if there are no new network requests for at least this duration.
|
|
63
|
-
*
|
|
64
|
-
* @default 100
|
|
65
|
-
*/
|
|
66
|
-
idleNetworkInterval?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Logger used to report status of captured archives.
|
|
69
|
-
*
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
reporter?: boolean | {
|
|
73
|
-
/**
|
|
74
|
-
* Whether the reporter is enabled.
|
|
75
|
-
*
|
|
76
|
-
* @default true
|
|
77
|
-
*/
|
|
78
|
-
enabled?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Log information about captured archives during test run.
|
|
81
|
-
*
|
|
82
|
-
* @default true
|
|
83
|
-
*/
|
|
84
|
-
verbose?: boolean;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Enables [TurboSnap](https://www.chromatic.com/docs/turbosnap/).
|
|
88
|
-
*
|
|
89
|
-
* @default false
|
|
90
|
-
*/
|
|
91
|
-
turboSnap?: boolean;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Vitest plugin for integrating with Chromatic's visual regression testing.
|
|
96
|
-
*/
|
|
97
|
-
declare function chromaticPlugin(userOptions?: Options): Vite.Plugin;
|
|
98
|
-
|
|
99
|
-
export { chromaticPlugin };
|