-
Notifications
You must be signed in to change notification settings - Fork 213
refactor: migrate jest to vitest #1998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
b8119f4
chore(all): migrate to vitest
andriimredocly 84163d0
packages/core/src/__tests__/output.test.ts
andriimredocly 13d73a4
packages/core/src/__tests__/resolve-http.test.ts
andriimredocly da225c2
packages/core/src/__tests__/utils.test.ts
tatomyr 1714eed
fix mock
tatomyr 0405186
remove threshold
tatomyr c6f6c2a
add vitest to the pipeline
tatomyr 1bff997
change pluralize import
tatomyr ec63758
packages/core/src/config/__tests__/config.test.ts
tatomyr aea3d04
Fix test in packages/core/src/__tests__/resolve-http.test.ts
andriimredocly 09c4ea2
packages/respect-core/src/modules/__tests__/flow-runner/runner/resolv…
andriimredocly 859ab90
respect-core
andriimredocly 0431624
packages/respect-core/src/modules/__tests__/flow-runner/run-step.test.ts
andriimredocly 036e949
packages/respect-core/src/modules/__tests__/flow-runner/schema/schema…
andriimredocly 39d83fe
packages/respect-core/src/modules/__tests__/flow-runner/context/creat…
andriimredocly 7c4fa34
packages/respect-core/src/utils/__tests__/har-logs/helpers/handle-req…
andriimredocly ace293c
fix vi.mock imports
andriimredocly 805d003
migrate all automatically migreatable
andriimredocly 7d68a36
remove .only in packages/core/src/rules/async3/__tests__/no-channel-t…
tatomyr 35d76cb
prettier all files
andriimredocly 0a89f4b
packages/cli/src/reunite/api/__tests__/api.client.test.ts
tatomyr fade1fb
make husky executable
andriimredocly d1eac91
packages/respect-core/src/modules/__tests__/config-parser/parse-reque…
andriimredocly f9b5459
packages/respect-core/src/modules/__tests__/arazzo-description-genera…
andriimredocly 7df1d49
packages/respect-core/src/utils/__tests__/mtls/resolve-mtls-certifica…
andriimredocly 1369b6c
packages/respect-core/src/modules/__tests__/config-parser/get-value-f…
andriimredocly 711abb5
packages/respect-core/src/modules/__tests__/flow-runner/runner/create…
andriimredocly aa4f6ef
packages/respect-core/src/modules/__tests__/flow-runner/context/creat…
andriimredocly 5483dac
packages/respect-core/src/modules/__tests__/flow-runner/get-workflows…
andriimredocly c20e1aa
packages/respect-core/src/utils/__tests__/yaml.test.ts
andriimredocly a77a00c
packages/respect-core/src/modules/__tests__/arazzo-description-genera…
andriimredocly e778c76
packages/respect-core/src/modules/__tests__/flow-runner/read-env-vari…
andriimredocly 168367b
packages/respect-core/src/utils/__tests__/har-logs/create-har-log.tes…
andriimredocly cd87c8e
packages/respect-core/src/modules/__tests__/flow-runner/outputs/print…
andriimredocly d281280
Fix typecheck
andriimredocly 2d83973
packages/cli/src/__tests__/utils.test.ts
tatomyr d4f6faf
packages/cli/src/reunite/commands/__tests__/utils.test.ts
tatomyr 7787ac2
packages/core/src/rules/common/assertions/__tests__/asserts.test.ts
andriimredocly b2a2e73
packages/core/src/__tests__/walk.test.ts
andriimredocly 3f1992d
packages/core/src/config/__tests__/load.test.ts
andriimredocly ac4f800
fix fs module property check
andriimredocly 775659b
packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples…
andriimredocly 04e9a09
packages/core/src/__tests__/resolve.test.ts
andriimredocly c20c3eb
packages/core/src/config/config-resolvers.ts
andriimredocly b93ac1e
Start E2E tests migration
andriimredocly 788a35f
packages/cli/src/commands/split/__tests__/index.test.ts (WIP)
tatomyr 4a8c179
packages/cli/src/__tests__/commands/lint.test.ts (WIP)
tatomyr 38369bc
packages/cli/src/reunite/commands/__tests__/push.test.ts (WIP)
tatomyr bec14ad
packages/cli/src/__tests__/wrapper.test.ts (WIP)
tatomyr 1aa5dbe
packages/cli/src/auth/__tests__/device-flow.test.ts (WIP)
tatomyr ccf9f9d
packages/cli/src/reunite/commands/__tests__/push-status.test.ts (WIP)
tatomyr eb03e4e
packages/cli/src/__tests__/commands/bundle.test.ts (WIP)
tatomyr 20f2e8a
packages/cli/src/__tests__/commands/join.test.ts (WIP)
tatomyr f5c0d77
packages/cli/src/auth/__tests__/oauth-client.test.ts (WIP)
tatomyr e7bfd71
packages/cli/src/__tests__/commands/build-docs.test.ts (WIP)
tatomyr ed222f8
remove __mocks__
tatomyr 954e6ec
remove .only
tatomyr 45a1bc0
Update vitest.config.e2e.ts
tatomyr 4b6466b
cleanup cli tests
tatomyr 8ae6375
remove test artifacts
tatomyr 8cdf89a
update engines
tatomyr b37eb90
fix types in tests
tatomyr 5a185d8
update unit tests configiration
tatomyr 7470dfc
update unit tests config
tatomyr 917de87
put the jest config back for a while
tatomyr db47c12
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: miscellaneous/resolve-refs-in-prep…
andriimredocly 760816c
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: miscellaneous/resolve-plugins/snap…
andriimredocly 46d56e0
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: miscellaneous/apply-per-api-decora…
andriimredocly 09c2f9e
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: lint/skip-rules/snapshot.js
andriimredocly 44a733e
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: bundle/discriminator-mapping/snaps…
andriimredocly 9aaa45e
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: bundle/bundle-description-long/sna…
andriimredocly 05bd7c0
RESOLVE_MULTI_EXPORT_IN_SNAPSHOT:: bundle/bundle-description-derefere…
andriimredocly a0d7f2b
MIGRATION_PREPARATION:: exclude __tests__/**/*snapshot*.js from prettier
andriimredocly 746add3
MIGRATION_PREPARATION:: unify getting results from cli
andriimredocly d744efc
MIGRATION_PREPARATION:: sort snaphost generation logic to be compatib…
andriimredocly b3d75b0
MIGRATION:: stats
andriimredocly 4618bd1
MIGRATION:: build-docs
andriimredocly b651565
MIGRATION:: miscellaneous
andriimredocly af86603
MIGRATION:: with metadata
andriimredocly 74017bc
MIGRATION:: bundle with long description
andriimredocly 21a4b05
MIGRATION:: bundle with option: dereferenced
andriimredocly ab6608a
MIGRATION:: bundle with option in config: remove-unused-components
andriimredocly e1f2da1
MIGRATION:: bundle with option: remove-unused-components
andriimredocly 6c62a82
MIGRATION:: bundle
andriimredocly c4b37b0
MIGRATION:: join
andriimredocly 665a116
MIGRATION:: split
andriimredocly b57c97d
MIGRATION:: lint-config
andriimredocly ac1c222
MIGRATION:: check-config
andriimredocly b18347a
MIGRATION:: zero-config
andriimredocly 8af6756
MIGRATION:: lint
andriimredocly fcebc96
POST_MIGRATION:: add __tests__/commands to e2e vitest config
andriimredocly 01bda8f
Run E2E with vitest only
andriimredocly e0bfc4b
Fix typecheck in E2E
andriimredocly 7985053
fix rebilly smoke test
andriimredocly 9b98dc5
delete unused jest toMatchSpecificSnapshot mock, fix node imports
andriimredocly 1a0fbc3
add fixme for quotes fix
andriimredocly 63d1b9e
use single vitest config for all suites
andriimredocly ce46e04
update tsconfigs
tatomyr d0b7e43
add unit-test code coverage
andriimredocly 8b5a350
fix tsconfigs
tatomyr 91974b8
fix browser env
tatomyr 248fc40
remove jest leftovers
tatomyr 7b3e97e
unskip resolve-plugins test and update contrib guide
tatomyr a43bbce
update the contrib guide
tatomyr 553a76e
fix getConfig: removed unused mock as the test tests other scenario
andriimredocly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
__tests__/build-docs/build-docs-with-config-option/snapshot.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`E2E build-docs build docs with config option 1`] = ` | ||
| Found nested/redocly.yaml and using theme.openapi options | ||
| Prerendering docs | ||
|
|
||
| 🎉 bundled successfully in: nested/redoc-static.html (36 KiB) [⏱ <test>ms]. | ||
|
|
||
|
|
||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`E2E build-docs simple build-docs 1`] = ` | ||
| Found undefined and using theme.openapi options | ||
| Prerendering docs | ||
|
|
||
| 🎉 bundled successfully in: redoc-static.html (330 KiB) [⏱ <test>ms]. | ||
|
|
||
|
|
||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
__tests__/bundle/bundle-description-dereferenced/snapshot_2.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| openapi: 3.1.0 | ||
| security: [] | ||
| paths: | ||
| /users: | ||
| post: | ||
| summary: user | ||
| description: User. | ||
| operationId: createUser | ||
| responses: | ||
| '200': | ||
| description: OK | ||
| requestBody: | ||
| description: Updated user object | ||
| content: | ||
| application/json: | ||
| schema: | ||
| description: Names (specific) | ||
| type: object | ||
| properties: &ref_0 | ||
| oneName: | ||
| description: One name (specific). | ||
| type: string | ||
| otherName: | ||
| description: Other name (specific). | ||
| type: string | ||
| required: true | ||
| components: | ||
| schemas: | ||
| Name: | ||
| type: string | ||
| description: Generic Name. | ||
| Names: | ||
| type: object | ||
| description: names description | ||
| properties: *ref_0 | ||
|
|
||
| bundling test.yaml... | ||
| 📦 Created a bundle for test.yaml at stdout <test>ms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| openapi: 3.1.0 | ||
| info: | ||
| version: 1.0.0 | ||
| title: Example.com | ||
| termsOfService: https://example.com/terms/ | ||
| contact: | ||
| email: contact@example.com | ||
| url: http://example.com/contact | ||
| license: | ||
| name: Apache 2.0 | ||
| url: http://www.apache.org/licenses/LICENSE-2.0.html | ||
| description: | | ||
| first line loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong | ||
| second line exists | ||
| security: [] | ||
| components: {} | ||
|
|
||
| bundling test.yaml... | ||
| 📦 Created a bundle for test.yaml at stdout <test>ms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be updated.