// @ts-expect-error missing types
-import { Pane, Splitpanes } from "splitpanes";
-import { browserState } from "~/composables/client";
+import { Pane, Splitpanes } from 'splitpanes'
+import { browserState } from '~/composables/client'
import {
coverageUrl,
coverageVisible,
- initializeNavigation,
detailSizes,
-} from "~/composables/navigation";
-import { onBrowserPanelResizing } from "~/composables/browser";
+ initializeNavigation,
+} from '~/composables/navigation'
+import { onBrowserPanelResizing } from '~/composables/browser'
-const dashboardVisible = initializeNavigation();
+const dashboardVisible = initializeNavigation()
const mainSizes = useLocalStorage<[left: number, right: number]>(
- "vitest-ui_splitpanes-mainSizes",
+ 'vitest-ui_splitpanes-mainSizes',
[33, 67],
{
initOnMounted: true,
- }
-);
+ },
+)
const onMainResized = useDebounceFn((event: { size: number }[]) => {
event.forEach((e, i) => {
- mainSizes.value[i] = e.size;
- });
-}, 0);
+ mainSizes.value[i] = e.size
+ })
+}, 0)
const onModuleResized = useDebounceFn((event: { size: number }[]) => {
event.forEach((e, i) => {
- detailSizes.value[i] = e.size;
- });
- onBrowserPanelResizing(false);
-}, 0);
+ detailSizes.value[i] = e.size
+ })
+ onBrowserPanelResizing(false)
+}, 0)
function resizeMain() {
- const width = window.innerWidth;
- const panelWidth = Math.min(width / 3, 300);
- mainSizes.value[0] = (100 * panelWidth) / width;
- mainSizes.value[1] = 100 - mainSizes.value[0];
+ const width = window.innerWidth
+ const panelWidth = Math.min(width / 3, 300)
+ mainSizes.value[0] = (100 * panelWidth) / width
+ mainSizes.value[1] = 100 - mainSizes.value[0]
}
@@ -58,14 +58,14 @@ function resizeMain() {
@@ -77,7 +77,7 @@ function resizeMain() {
diff --git a/test/coverage-test/coverage-report-tests/__snapshots__/istanbul.report.test.ts.snap b/test/coverage-test/coverage-report-tests/__snapshots__/istanbul.report.test.ts.snap
index ebb7ee824..7dc8db961 100644
--- a/test/coverage-test/coverage-report-tests/__snapshots__/istanbul.report.test.ts.snap
+++ b/test/coverage-test/coverage-report-tests/__snapshots__/istanbul.report.test.ts.snap
@@ -267,7 +267,7 @@ exports[`istanbul json report 1`] = `
"loc": {
"end": {
"column": null,
- "line": 8,
+ "line": 10,
},
"start": {
"column": 0,
@@ -278,7 +278,7 @@ exports[`istanbul json report 1`] = `
{
"end": {
"column": null,
- "line": 8,
+ "line": 10,
},
"start": {
"column": 0,
@@ -288,10 +288,10 @@ exports[`istanbul json report 1`] = `
{
"end": {
"column": null,
- "line": 8,
+ "line": 10,
},
"start": {
- "column": 2,
+ "column": 5,
"line": 8,
},
},
@@ -323,7 +323,7 @@ exports[`istanbul json report 1`] = `
"1": {
"end": {
"column": null,
- "line": 8,
+ "line": 10,
},
"start": {
"column": 0,
@@ -343,21 +343,21 @@ exports[`istanbul json report 1`] = `
"3": {
"end": {
"column": null,
- "line": 8,
+ "line": 9,
},
"start": {
"column": 2,
- "line": 8,
+ "line": 9,
},
},
"4": {
"end": {
"column": null,
- "line": 12,
+ "line": 14,
},
"start": {
"column": 5,
- "line": 12,
+ "line": 14,
},
},
},
diff --git a/test/coverage-test/coverage-report-tests/__snapshots__/v8.report.test.ts.snap b/test/coverage-test/coverage-report-tests/__snapshots__/v8.report.test.ts.snap
index 5d1808f09..a0e0edfc1 100644
--- a/test/coverage-test/coverage-report-tests/__snapshots__/v8.report.test.ts.snap
+++ b/test/coverage-test/coverage-report-tests/__snapshots__/v8.report.test.ts.snap
@@ -582,26 +582,26 @@ exports[`v8 json report 1`] = `
},
"branchMap": {
"0": {
- "line": 6,
+ "line": 7,
"loc": {
"end": {
- "column": 36,
- "line": 8,
+ "column": 1,
+ "line": 10,
},
"start": {
- "column": 33,
- "line": 6,
+ "column": 0,
+ "line": 7,
},
},
"locations": [
{
"end": {
- "column": 36,
- "line": 8,
+ "column": 1,
+ "line": 10,
},
"start": {
- "column": 33,
- "line": 6,
+ "column": 0,
+ "line": 7,
},
},
],
@@ -614,10 +614,13 @@ exports[`v8 json report 1`] = `
"s": {
"0": 1,
"1": 1,
- "11": 1,
+ "13": 1,
"4": 1,
"5": 1,
+ "6": 0,
"7": 0,
+ "8": 0,
+ "9": 0,
},
"statementMap": {
"0": {
@@ -640,19 +643,19 @@ exports[`v8 json report 1`] = `
"line": 2,
},
},
- "11": {
+ "13": {
"end": {
"column": 15,
- "line": 12,
+ "line": 14,
},
"start": {
"column": 0,
- "line": 12,
+ "line": 14,
},
},
"4": {
"end": {
- "column": 12,
+ "column": 14,
"line": 5,
},
"start": {
@@ -670,9 +673,19 @@ exports[`v8 json report 1`] = `
"line": 6,
},
},
+ "6": {
+ "end": {
+ "column": 1,
+ "line": 7,
+ },
+ "start": {
+ "column": 0,
+ "line": 7,
+ },
+ },
"7": {
"end": {
- "column": 36,
+ "column": 6,
"line": 8,
},
"start": {
@@ -680,6 +693,26 @@ exports[`v8 json report 1`] = `
"line": 8,
},
},
+ "8": {
+ "end": {
+ "column": 36,
+ "line": 9,
+ },
+ "start": {
+ "column": 0,
+ "line": 9,
+ },
+ },
+ "9": {
+ "end": {
+ "column": 1,
+ "line": 10,
+ },
+ "start": {
+ "column": 0,
+ "line": 10,
+ },
+ },
},
},
"/src/Hello.vue": {
diff --git a/test/coverage-test/src/Defined.vue b/test/coverage-test/src/Defined.vue
index 0f116e00b..8e72b8746 100644
--- a/test/coverage-test/src/Defined.vue
+++ b/test/coverage-test/src/Defined.vue
@@ -2,10 +2,12 @@
const defined = MY_CONSTANT
/* eslint-disable no-console */
-if (defined)
+if (defined) {
console.log('Covered condition')
-else
+}
+else {
console.log('Uncovered condition')
+}