@storybook/addon-vitest 10.4.0-alpha.9 → 10.4.0
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/_browser-chunks/{chunk-FP6EVVC6.js → chunk-OHAJYSSA.js} +6 -2
- package/dist/_node-chunks/{chunk-DJI3VOGK.js → chunk-2AKEM4UX.js} +7 -7
- package/dist/_node-chunks/{chunk-FU2BMBDJ.js → chunk-JJQYOXDZ.js} +7 -7
- package/dist/_node-chunks/{chunk-FJEXC634.js → chunk-MFSB6XRG.js} +11 -11
- package/dist/_node-chunks/{chunk-CTGQX4I4.js → chunk-ND5F2TIW.js} +6 -6
- package/dist/_node-chunks/{chunk-NQDKZP42.js → chunk-O425NKQQ.js} +11 -7
- package/dist/_node-chunks/{chunk-TWBXMUM7.js → chunk-PRDAQQS2.js} +7 -7
- package/dist/_node-chunks/{chunk-HLSIDKFS.js → chunk-SYNP577C.js} +6 -6
- package/dist/_node-chunks/{chunk-NW66GODK.js → chunk-UVWTPUS4.js} +6 -6
- package/dist/_node-chunks/{vitest.config.3.2.template-UK3R7G3D.js → vitest.config.3.2.template-BDFVHOAR.js} +7 -7
- package/dist/_node-chunks/{vitest.config.4.template-YOFP47IQ.js → vitest.config.4.template-KCDTWAQI.js} +7 -7
- package/dist/_node-chunks/{vitest.config.template-NJTBB3IT.js → vitest.config.template-H43IN6V5.js} +7 -7
- package/dist/_node-chunks/{vitest.workspace.template-AGOMLQ3C.js → vitest.workspace.template-3HAYOQSE.js} +7 -7
- package/dist/constants.d.ts +15 -23
- package/dist/constants.js +14 -8
- package/dist/manager.js +4 -1
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +52 -27
- package/dist/postinstall.js +18 -18
- package/dist/preset.js +51 -53
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +130 -41
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/dist/vitest-plugin/test-utils.js +40 -4
- package/package.json +7 -7
package/dist/node/vitest.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_2690q0eq68xj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_2690q0eq68xj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_2690q0eq68xj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_2690q0eq68xj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_2690q0eq68xj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_2690q0eq68xj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,27 +12,28 @@ var require = CJS_COMPAT_NODE_MODULE_q2gis08bcc.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-MFSB6XRG.js";
|
|
16
16
|
import {
|
|
17
17
|
any,
|
|
18
18
|
up
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
-
import
|
|
21
|
-
ADDON_ID2 as ADDON_ID,
|
|
22
|
-
COVERAGE_DIRECTORY,
|
|
23
|
-
STATUS_TYPE_ID_A11Y,
|
|
24
|
-
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
25
|
-
storeOptions
|
|
26
|
-
} from "../_node-chunks/chunk-NQDKZP42.js";
|
|
27
|
-
import "../_node-chunks/chunk-DJI3VOGK.js";
|
|
19
|
+
} from "../_node-chunks/chunk-ND5F2TIW.js";
|
|
20
|
+
import "../_node-chunks/chunk-2AKEM4UX.js";
|
|
28
21
|
import {
|
|
29
22
|
dirname,
|
|
30
23
|
join,
|
|
31
24
|
normalize,
|
|
32
25
|
path,
|
|
33
26
|
resolve
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
35
|
-
import
|
|
27
|
+
} from "../_node-chunks/chunk-UVWTPUS4.js";
|
|
28
|
+
import {
|
|
29
|
+
ADDON_ID2 as ADDON_ID,
|
|
30
|
+
COVERAGE_DIRECTORY,
|
|
31
|
+
STATUS_TYPE_ID_A11Y,
|
|
32
|
+
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
33
|
+
STORYBOOK_TEST_PROVIDE_KEY,
|
|
34
|
+
storeOptions
|
|
35
|
+
} from "../_node-chunks/chunk-O425NKQQ.js";
|
|
36
|
+
import "../_node-chunks/chunk-SYNP577C.js";
|
|
36
37
|
|
|
37
38
|
// src/node/vitest.ts
|
|
38
39
|
import process2 from "node:process";
|
|
@@ -205,7 +206,10 @@ var DOUBLE_SPACES = " ", getTestName = (name) => `${name}${DOUBLE_SPACES}`, Vit
|
|
|
205
206
|
}), vitestWorkspaceConfig, firstVitestConfig;
|
|
206
207
|
for (let location of potentialConfigFileLocations) {
|
|
207
208
|
for (let file of configFiles) {
|
|
208
|
-
let maybe = any([file], {
|
|
209
|
+
let maybe = any([file], {
|
|
210
|
+
cwd: location,
|
|
211
|
+
last: getProjectRoot()
|
|
212
|
+
});
|
|
209
213
|
if (maybe && existsSync(maybe)) {
|
|
210
214
|
firstVitestConfig ??= dirname(maybe);
|
|
211
215
|
let content = readFileSync(maybe, "utf8");
|
|
@@ -340,9 +344,15 @@ Please install the @vitest/${isIstanbul ? "coverage-istanbul" : "coverage-v8"} p
|
|
|
340
344
|
}
|
|
341
345
|
return { filteredTestSpecifications, filteredStoryIds };
|
|
342
346
|
}
|
|
347
|
+
getCurrentRunConfig() {
|
|
348
|
+
return this.testManager.store.getState().currentRun.config;
|
|
349
|
+
}
|
|
350
|
+
provideRunConfig() {
|
|
351
|
+
this.vitest?.provide(STORYBOOK_TEST_PROVIDE_KEY, this.getCurrentRunConfig());
|
|
352
|
+
}
|
|
343
353
|
async runTests(runPayload) {
|
|
344
|
-
let { watching
|
|
345
|
-
this.vitest ? currentCoverage !== coverageShouldBeEnabled ? await this.restartVitest({ coverage: coverageShouldBeEnabled }) : await this.vitestRestartPromise : await this.startVitest({ coverage: coverageShouldBeEnabled }), this.resetGlobalTestNamePattern(), await this.cancelCurrentRun();
|
|
354
|
+
let { watching } = this.testManager.store.getState(), coverageShouldBeEnabled = !!this.getCurrentRunConfig().coverage && !watching && (runPayload?.storyIds?.length ?? 0) === 0, currentCoverage = this.vitest?.config.coverage?.enabled;
|
|
355
|
+
this.vitest ? currentCoverage !== coverageShouldBeEnabled ? await this.restartVitest({ coverage: coverageShouldBeEnabled }) : await this.vitestRestartPromise : await this.startVitest({ coverage: coverageShouldBeEnabled }), this.provideRunConfig(), this.resetGlobalTestNamePattern(), await this.cancelCurrentRun();
|
|
346
356
|
let testSpecifications = await this.getStorybookTestSpecifications(), allStories = this.getStories(), filteredStories = runPayload.storyIds ? allStories.filter((story) => runPayload.storyIds?.includes(story.id)) : allStories;
|
|
347
357
|
if (runPayload.storyIds?.length) {
|
|
348
358
|
let regex = this.buildTestNamePatternForStories(filteredStories, allStories);
|
|
@@ -404,7 +414,7 @@ Please install the @vitest/${isIstanbul ? "coverage-istanbul" : "coverage-v8"} p
|
|
|
404
414
|
...s.currentRun,
|
|
405
415
|
totalTestCount: filteredStoryIds.length
|
|
406
416
|
}
|
|
407
|
-
})), await this.vitest.cancelCurrentRun("keyboard-input"), await this.runningPromise, await this.vitest.runTestSpecifications(filteredTestSpecifications, !1);
|
|
417
|
+
})), await this.vitest.cancelCurrentRun("keyboard-input"), await this.runningPromise, this.provideRunConfig(), await this.vitest.runTestSpecifications(filteredTestSpecifications, !1);
|
|
408
418
|
}
|
|
409
419
|
});
|
|
410
420
|
}
|
|
@@ -487,11 +497,12 @@ var testStateToStatusValueMap = {
|
|
|
487
497
|
sidebarContextMenu: !1
|
|
488
498
|
}));
|
|
489
499
|
this.componentTestStatusStore.set(componentTestStatuses);
|
|
490
|
-
let a11yReportsByStoryId = {}, a11yStatuses = [];
|
|
500
|
+
let a11yReportsByStoryId = {}, reportsByStoryId = {}, a11yStatuses = [];
|
|
491
501
|
for (let { storyId, reports } of testCaseResultsToFlush) {
|
|
502
|
+
reports?.length && (reportsByStoryId[storyId] = reports);
|
|
492
503
|
let storyA11yReports = reports?.filter((r) => r.type === "a11y");
|
|
493
504
|
if (storyA11yReports?.length) {
|
|
494
|
-
a11yReportsByStoryId[storyId] = storyA11yReports.map((
|
|
505
|
+
a11yReportsByStoryId[storyId] = storyA11yReports.map((report) => report.result);
|
|
495
506
|
for (let a11yReport of storyA11yReports)
|
|
496
507
|
a11yStatuses.push({
|
|
497
508
|
storyId,
|
|
@@ -516,13 +527,25 @@ var testStateToStatusValueMap = {
|
|
|
516
527
|
currentRun: {
|
|
517
528
|
...s.currentRun,
|
|
518
529
|
componentTestCount: { success: ctSuccess, error: ctError },
|
|
519
|
-
a11yCount: {
|
|
530
|
+
a11yCount: {
|
|
531
|
+
success: a11ySuccess,
|
|
532
|
+
warning: a11yWarning,
|
|
533
|
+
error: a11yError
|
|
534
|
+
},
|
|
520
535
|
componentTestStatuses: s.currentRun.componentTestStatuses.concat(componentTestStatuses),
|
|
521
536
|
a11yStatuses: s.currentRun.a11yStatuses.concat(a11yStatuses),
|
|
537
|
+
/*
|
|
538
|
+
TODO: a11yReports is just here for backwards compatibility with older versions of addon-mcp.
|
|
539
|
+
They are also part of the more generic reports property, so we can remove this in a future major release when we can break compatibility.
|
|
540
|
+
*/
|
|
522
541
|
a11yReports: {
|
|
523
542
|
...s.currentRun.a11yReports,
|
|
524
543
|
...a11yReportsByStoryId
|
|
525
544
|
},
|
|
545
|
+
reports: {
|
|
546
|
+
...s.currentRun.reports,
|
|
547
|
+
...reportsByStoryId
|
|
548
|
+
},
|
|
526
549
|
// in some cases successes and errors can exceed the anticipated totalTestCount
|
|
527
550
|
// e.g. when testing more tests than the stories we know about upfront
|
|
528
551
|
// in those cases, we set the totalTestCount to the sum of successes and errors
|
|
@@ -531,7 +554,9 @@ var testStateToStatusValueMap = {
|
|
|
531
554
|
};
|
|
532
555
|
});
|
|
533
556
|
}, 500);
|
|
534
|
-
this.store = options.store, this.componentTestStatusStore = options.componentTestStatusStore, this.a11yStatusStore = options.a11yStatusStore, this.testProviderStore = options.testProviderStore, this.onReady = options.onReady, this.storybookOptions = options.storybookOptions, this.vitestManager = new VitestManager(this), this.store.subscribe("TRIGGER_RUN", this.handleTriggerRunEvent.bind(this)), this.store.subscribe("CANCEL_RUN", this.handleCancelEvent.bind(this)), this.store.untilReady().then(() => this.vitestManager.startVitest({
|
|
557
|
+
this.store = options.store, this.componentTestStatusStore = options.componentTestStatusStore, this.a11yStatusStore = options.a11yStatusStore, this.testProviderStore = options.testProviderStore, this.onReady = options.onReady, this.storybookOptions = options.storybookOptions, this.vitestManager = new VitestManager(this), this.store.subscribe("TRIGGER_RUN", this.handleTriggerRunEvent.bind(this)), this.store.subscribe("CANCEL_RUN", this.handleCancelEvent.bind(this)), this.store.untilReady().then(() => this.vitestManager.startVitest({
|
|
558
|
+
coverage: this.store.getState().config.coverage
|
|
559
|
+
})).then(() => this.onReady?.()).catch((e) => {
|
|
535
560
|
this.reportFatalError("Failed to start Vitest", e);
|
|
536
561
|
});
|
|
537
562
|
}
|
|
@@ -581,7 +606,7 @@ var testStateToStatusValueMap = {
|
|
|
581
606
|
storyIds,
|
|
582
607
|
config: runConfig
|
|
583
608
|
}
|
|
584
|
-
})),
|
|
609
|
+
})), await this.testProviderStore.runWithState(async () => {
|
|
585
610
|
if (await callback(), this.store.send({
|
|
586
611
|
type: "TEST_RUN_COMPLETED",
|
|
587
612
|
payload: this.store.getState().currentRun
|
package/dist/postinstall.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_2690q0eq68xj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_2690q0eq68xj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_2690q0eq68xj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_2690q0eq68xj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_2690q0eq68xj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_2690q0eq68xj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
any
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import {
|
|
16
|
-
DOCUMENTATION_LINK
|
|
17
|
-
} from "./_node-chunks/chunk-NQDKZP42.js";
|
|
14
|
+
} from "./_node-chunks/chunk-ND5F2TIW.js";
|
|
18
15
|
import {
|
|
19
16
|
require_dist
|
|
20
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-JJQYOXDZ.js";
|
|
21
18
|
import {
|
|
22
19
|
dirname,
|
|
23
20
|
normalize,
|
|
24
21
|
relative,
|
|
25
22
|
resolve
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-UVWTPUS4.js";
|
|
24
|
+
import {
|
|
25
|
+
DOCUMENTATION_LINK
|
|
26
|
+
} from "./_node-chunks/chunk-O425NKQQ.js";
|
|
27
27
|
import {
|
|
28
28
|
require_compare,
|
|
29
29
|
require_constants,
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
require_parse_options,
|
|
34
34
|
require_re,
|
|
35
35
|
require_semver
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-PRDAQQS2.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__toESM
|
|
40
|
-
} from "./_node-chunks/chunk-
|
|
40
|
+
} from "./_node-chunks/chunk-SYNP577C.js";
|
|
41
41
|
|
|
42
42
|
// ../../../node_modules/semver/functions/parse.js
|
|
43
43
|
var require_parse = __commonJS({
|
|
@@ -902,13 +902,13 @@ import {
|
|
|
902
902
|
async function getTemplatePath(name) {
|
|
903
903
|
switch (name) {
|
|
904
904
|
case "vitest.config.template":
|
|
905
|
-
return import("./_node-chunks/vitest.config.template-
|
|
905
|
+
return import("./_node-chunks/vitest.config.template-H43IN6V5.js");
|
|
906
906
|
case "vitest.config.4.template":
|
|
907
|
-
return import("./_node-chunks/vitest.config.4.template-
|
|
907
|
+
return import("./_node-chunks/vitest.config.4.template-KCDTWAQI.js");
|
|
908
908
|
case "vitest.config.3.2.template":
|
|
909
|
-
return import("./_node-chunks/vitest.config.3.2.template-
|
|
909
|
+
return import("./_node-chunks/vitest.config.3.2.template-BDFVHOAR.js");
|
|
910
910
|
case "vitest.workspace.template":
|
|
911
|
-
return import("./_node-chunks/vitest.workspace.template-
|
|
911
|
+
return import("./_node-chunks/vitest.workspace.template-3HAYOQSE.js");
|
|
912
912
|
default:
|
|
913
913
|
throw new Error(`Unknown template: ${name}`);
|
|
914
914
|
}
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_2690q0eq68xj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_2690q0eq68xj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_2690q0eq68xj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_2690q0eq68xj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_2690q0eq68xj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_2690q0eq68xj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,16 @@ import {
|
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log,
|
|
15
15
|
noop
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-MFSB6XRG.js";
|
|
17
|
+
import {
|
|
18
|
+
require_picocolors
|
|
19
|
+
} from "./_node-chunks/chunk-2AKEM4UX.js";
|
|
20
|
+
import {
|
|
21
|
+
require_dist
|
|
22
|
+
} from "./_node-chunks/chunk-JJQYOXDZ.js";
|
|
23
|
+
import {
|
|
24
|
+
normalize
|
|
25
|
+
} from "./_node-chunks/chunk-UVWTPUS4.js";
|
|
17
26
|
import {
|
|
18
27
|
ADDON_ID2 as ADDON_ID,
|
|
19
28
|
COVERAGE_DIRECTORY,
|
|
@@ -24,19 +33,10 @@ import {
|
|
|
24
33
|
TRIGGER_TEST_RUN_REQUEST,
|
|
25
34
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
26
35
|
storeOptions
|
|
27
|
-
} from "./_node-chunks/chunk-
|
|
28
|
-
import {
|
|
29
|
-
require_picocolors
|
|
30
|
-
} from "./_node-chunks/chunk-DJI3VOGK.js";
|
|
31
|
-
import {
|
|
32
|
-
require_dist
|
|
33
|
-
} from "./_node-chunks/chunk-FU2BMBDJ.js";
|
|
34
|
-
import {
|
|
35
|
-
normalize
|
|
36
|
-
} from "./_node-chunks/chunk-NW66GODK.js";
|
|
36
|
+
} from "./_node-chunks/chunk-O425NKQQ.js";
|
|
37
37
|
import {
|
|
38
38
|
__toESM
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-SYNP577C.js";
|
|
40
40
|
|
|
41
41
|
// src/preset.ts
|
|
42
42
|
import { mkdir } from "node:fs/promises";
|
|
@@ -466,7 +466,7 @@ var experimental_serverChannel = async (channel, options) => {
|
|
|
466
466
|
isEqual(selectCachedState(state), selectCachedState(previousState)) || fsCache.set("state", selectCachedState(state));
|
|
467
467
|
});
|
|
468
468
|
let testProviderStore = experimental_getTestProviderStore(ADDON_ID);
|
|
469
|
-
|
|
469
|
+
storyIndexGenerator.onInvalidated(async () => {
|
|
470
470
|
try {
|
|
471
471
|
let index = await storyIndexGenerator.getIndex();
|
|
472
472
|
store.setState((s) => ({ ...s, index }));
|
|
@@ -562,40 +562,38 @@ var experimental_serverChannel = async (channel, options) => {
|
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
});
|
|
565
|
-
})
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
return channel;
|
|
565
|
+
});
|
|
566
|
+
let enableCrashReports = core?.enableCrashReports || options.enableCrashReports;
|
|
567
|
+
return channel.on(STORYBOOK_ADDON_TEST_CHANNEL, (event) => {
|
|
568
|
+
event.type !== "test-run-completed" && telemetry("addon-test", () => ({
|
|
569
|
+
...event,
|
|
570
|
+
payload: {
|
|
571
|
+
...event.payload,
|
|
572
|
+
storyId: oneWayHash(event.payload.storyId)
|
|
573
|
+
}
|
|
574
|
+
}));
|
|
575
|
+
}), store.subscribe("TOGGLE_WATCHING", async (event) => {
|
|
576
|
+
await telemetry("addon-test", () => ({
|
|
577
|
+
watchMode: event.payload.to
|
|
578
|
+
}));
|
|
579
|
+
}), store.subscribe("TEST_RUN_COMPLETED", async (event) => {
|
|
580
|
+
let { unhandledErrors, startedAt, finishedAt, ...currentRun } = event.payload;
|
|
581
|
+
await telemetry("addon-test", () => ({
|
|
582
|
+
...currentRun,
|
|
583
|
+
duration: (finishedAt ?? 0) - (startedAt ?? 0),
|
|
584
|
+
unhandledErrorCount: unhandledErrors.length,
|
|
585
|
+
...enableCrashReports && unhandledErrors.length > 0 && {
|
|
586
|
+
unhandledErrors: unhandledErrors.map((error) => {
|
|
587
|
+
let { stacks, ...errorWithoutStacks } = error;
|
|
588
|
+
return sanitizeError(errorWithoutStacks);
|
|
589
|
+
})
|
|
590
|
+
}
|
|
591
|
+
}));
|
|
592
|
+
}), enableCrashReports && store.subscribe("FATAL_ERROR", async (event) => {
|
|
593
|
+
await telemetry("addon-test", () => ({
|
|
594
|
+
fatalError: cleanPaths(event.payload.error.message)
|
|
595
|
+
}));
|
|
596
|
+
}), channel;
|
|
599
597
|
}, staticDirs = async (values = [], options) => {
|
|
600
598
|
if (options.configType === "PRODUCTION")
|
|
601
599
|
return values;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_2690q0eq68xj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_2690q0eq68xj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_2690q0eq68xj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_2690q0eq68xj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_2690q0eq68xj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_2690q0eq68xj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-SYNP577C.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/tree-kill/index.js
|
|
19
19
|
var require_tree_kill = __commonJS({
|