Skip to content

Commit 31ee30b

Browse files
authored
chore: convert CLI tests to vitest (#32416)
* chore: rename snapshots and spec files to fit vitest convention (#32405) * chore: move compiled files to dist directory to make vitest convertion easier (#32406) * chore: convert utils to vitest (#32407) * chore: convert logger to vitest * chore: convert errors spec to vitest * chore: convert cypress spec to vitest * chore: convert `exec` directory to `vitest` (#32428) * chore: cut over exec directory to vitest * Update cli/test/lib/exec/run.spec.ts * Update cli/test/lib/exec/run.spec.ts * Update cli/test/lib/exec/run.spec.ts * chore: convert the CLI and build script specs over to vitest (#32438) * chore: convert tasks directory to vitest (#32434) change way verify module is exported due to issues interpreting module (thinks its an esm) rework scripts as we cannot run an empty mocha suite chore: fix snapshots and verify requires that are internal to the cypress project fix stubbing issues with fs-extra which is also used by request-progress under the hood fix issues where xvfb was stopping prematurely * chore: remove files no longer used now that mocha tests are converted to vitest (#32455) * build binaries * chore: fix CLI tests (#32484) * chore: remove CI branch
1 parent 387a2d8 commit 31ee30b

File tree

101 files changed

+9788
-8524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+9788
-8524
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
9-2-2025-cli2
2+
9-12-2025

.circleci/workflows.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
3838
- /^release\/\d+\.\d+\.\d+$/
3939
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4040
- 'update-v8-snapshot-cache-on-develop'
41-
- 'update-tsx'
41+
- 'feature/cli_to_vitest'
4242

4343
# usually we don't build Mac app - it takes a long time
4444
# but sometimes we want to really confirm we are doing the right thing
@@ -49,7 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters
4949
- equal: [ develop, << pipeline.git.branch >> ]
5050
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5151
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
52-
- equal: [ 'update-tsx', << pipeline.git.branch >> ]
52+
- equal: [ 'feature/cli_to_vitest', << pipeline.git.branch >> ]
5353
- matches:
5454
pattern: /^release\/\d+\.\d+\.\d+$/
5555
value: << pipeline.git.branch >>
@@ -60,7 +60,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
6060
- equal: [ develop, << pipeline.git.branch >> ]
6161
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
6262
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
63-
- equal: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ]
63+
- equal: [ 'feature/cli_to_vitest', << pipeline.git.branch >> ]
6464
- matches:
6565
pattern: /^release\/\d+\.\d+\.\d+$/
6666
value: << pipeline.git.branch >>
@@ -83,7 +83,7 @@ windowsWorkflowFilters: &windows-workflow-filters
8383
- equal: [ develop, << pipeline.git.branch >> ]
8484
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
8585
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
86-
- equal: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ]
86+
- equal: [ 'feature/cli_to_vitest', << pipeline.git.branch >> ]
8787
- matches:
8888
pattern: /^release\/\d+\.\d+\.\d+$/
8989
value: << pipeline.git.branch >>
@@ -163,7 +163,7 @@ commands:
163163
name: Set environment variable to determine whether or not to persist artifacts
164164
command: |
165165
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
166-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-tsx" ]]; then
166+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feature/cli_to_vitest" ]]; then
167167
export SHOULD_PERSIST_ARTIFACTS=true
168168
fi' >> "$BASH_ENV"
169169
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
@@ -1828,7 +1828,7 @@ jobs:
18281828
source ./scripts/ensure-node.sh
18291829
yarn lerna run types
18301830
- sanitize-verify-and-store-mocha-results:
1831-
expectedResultCount: 20
1831+
expectedResultCount: 19
18321832

18331833
verify-release-readiness:
18341834
<<: *defaults

cli/.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ package.json
1313
/react
1414
/vue
1515
/svelte
16-
/mount-utils
16+
/mount-utils
17+
tsconfig.esm.json

cli/.mocharc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

cli/__snapshots__/build_spec.ts.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

cli/__snapshots__/cypress_spec.ts.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

cli/__snapshots__/download_spec.ts.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

cli/__snapshots__/errors_spec.ts.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)