diff --git a/.gitignore b/.gitignore index 5563c958ee4a..6a2dabb55510 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ bench/test/*/*/ cypress/videos cypress/downloads cypress/screenshots +packages/ui/cypress/videos +packages/ui/cypress/downloads +packages/ui/cypress/screenshots docs/public/user-avatars docs/public/sponsors .eslintcache diff --git a/docs/guide/cli.md b/docs/guide/cli.md index 1e1314a5f330..31fb94317ff1 100644 --- a/docs/guide/cli.md +++ b/docs/guide/cli.md @@ -76,6 +76,8 @@ vitest related /src/index.ts /src/hello-world.js | `--shard ` | Execute tests in a specified shard | | `--sequence` | Define in what order to run tests. Use [cac's dot notation] to specify options (for example, use `--sequence.shuffle` to run tests in random order) | | `--no-color` | Removes colors from the console output | +| `--inspect` | Enables Node.js inspector | +| `--inspect-brk` | Enables Node.js inspector with break | | `-h, --help` | Display available CLI options | ### changed diff --git a/packages/ui/client/components/dashboard/DashboardEntry.vue b/packages/ui/client/components/dashboard/DashboardEntry.vue index 0550f3ab5691..1fd4adae8ed7 100644 --- a/packages/ui/client/components/dashboard/DashboardEntry.vue +++ b/packages/ui/client/components/dashboard/DashboardEntry.vue @@ -12,7 +12,7 @@ withDefaults(defineProps<{ tail?: boolean }>(), { tail: false }) - diff --git a/packages/ui/client/composables/module-graph.ts b/packages/ui/client/composables/module-graph.ts index 5c2ce2145c67..1ad9d7994f86 100644 --- a/packages/ui/client/composables/module-graph.ts +++ b/packages/ui/client/composables/module-graph.ts @@ -1,6 +1,6 @@ import type { Graph, GraphConfig, GraphController, GraphLink, GraphNode } from 'd3-graph-controller' import { defineGraph, defineLink, defineNode } from 'd3-graph-controller' -import type { ModuleGraphData } from '../../../vitest/src/types' +import type { ModuleGraphData } from 'vitest/src/types' export type ModuleType = 'external' | 'inline' export type ModuleNode = GraphNode diff --git a/packages/ui/index.html b/packages/ui/index.html index 7ab703179b9a..d6ba5b04bddb 100644 --- a/packages/ui/index.html +++ b/packages/ui/index.html @@ -21,4 +21,4 @@
- \ No newline at end of file + diff --git a/packages/vitest/src/node/cli.ts b/packages/vitest/src/node/cli.ts index 6b9edd92891d..2650ca6481c5 100644 --- a/packages/vitest/src/node/cli.ts +++ b/packages/vitest/src/node/cli.ts @@ -71,28 +71,28 @@ cli cli.parse() -async function runRelated(relatedFiles: string[] | string, argv: CliOptions) { +async function runRelated(relatedFiles: string[] | string, argv: CliOptions): Promise { argv.related = relatedFiles argv.passWithNoTests ??= true await start('test', [], argv) } -async function watch(cliFilters: string[], options: CliOptions) { +async function watch(cliFilters: string[], options: CliOptions): Promise { options.watch = true await start('test', cliFilters, options) } -async function run(cliFilters: string[], options: CliOptions) { +async function run(cliFilters: string[], options: CliOptions): Promise { options.run = true await start('test', cliFilters, options) } -async function benchmark(cliFilters: string[], options: CliOptions) { +async function benchmark(cliFilters: string[], options: CliOptions): Promise { console.warn(c.yellow('Benchmarking is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest\'s version when using it.')) await start('benchmark', cliFilters, options) } -async function start(mode: VitestRunMode, cliFilters: string[], options: CliOptions) { +async function start(mode: VitestRunMode, cliFilters: string[], options: CliOptions): Promise { try { if (await startVitest(mode, cliFilters, options) === false) process.exit() diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d728589810c..025fad623b03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,7 +123,7 @@ importers: unocss: 0.45.29_vite@3.1.0 unplugin-vue-components: 0.22.8_vue@3.2.41 vite: 3.1.0 - vite-plugin-pwa: 0.13.1_zp7t6aa2r77waajuyr5zt63phe + vite-plugin-pwa: 0.13.1_vite@3.1.0 vitepress: 1.0.0-alpha.21 workbox-window: 6.5.4 @@ -290,7 +290,7 @@ importers: '@types/react-test-renderer': 17.0.2 '@vitejs/plugin-react': 2.1.0_vite@3.1.0 '@vitest/ui': link:../../packages/ui - happy-dom: 7.5.13 + happy-dom: 7.5.14 jsdom: 20.0.1 react-test-renderer: 17.0.2_react@17.0.2 vite: 3.1.0 @@ -958,7 +958,7 @@ importers: devDependencies: '@vitejs/plugin-vue': 3.1.2_vite@3.1.0+vue@3.2.41 '@vue/test-utils': 2.1.0_vue@3.2.41 - happy-dom: 7.5.13 + happy-dom: 7.5.14 vite: 3.1.0 vitest: link:../../packages/vitest vue: 3.2.41 @@ -11820,8 +11820,8 @@ packages: - encoding dev: true - /happy-dom/7.5.13: - resolution: {integrity: sha512-J8OehFPl71FtmkifnxqUpFWHA9jJ5pIwnEAFdZvZnXexev6RIgtkB6H/pTEHhBp7qCGUPHhkjvF3gqKxlBTeLg==} + /happy-dom/7.5.14: + resolution: {integrity: sha512-/MXcRnAQSgahOGBQOXr77hJrEpzwEAh9F7P6o7COlUp4o1QwLD/7qQPb55Po3MDeMYQfsEnXfQPT2YXAbKmn2Q==} dependencies: css.escape: 1.5.1 he: 1.2.0 @@ -18895,11 +18895,10 @@ packages: - supports-color dev: true - /vite-plugin-pwa/0.13.1_zp7t6aa2r77waajuyr5zt63phe: + /vite-plugin-pwa/0.13.1_vite@3.1.0: resolution: {integrity: sha512-NR3dIa+o2hzlzo4lF4Gu0cYvoMjSw2DdRc6Epw1yjmCqWaGuN86WK9JqZie4arNlE1ZuWT3CLiMdiX5wcmmUmg==} peerDependencies: vite: ^3.1.0 - workbox-window: ^6.5.4 dependencies: debug: 4.3.4 fast-glob: 3.2.12