-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): migrate from jest to vitest (#1945)
* chore(test): migrate from jest to vitest * fix(i18n): update test * fix: tests * fix: improve solution --------- Co-authored-by: Dorian Maliszewski <[email protected]>
- Loading branch information
1 parent
067dd9f
commit d654667
Showing
114 changed files
with
2,835 additions
and
789 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
node_modules/ | ||
dist/ | ||
build/ | ||
__typetests__/ | ||
__typetests__/ | ||
packages_deprecated/ |
This file contains 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 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 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 |
---|---|---|
|
@@ -53,6 +53,10 @@ jobs: | |
- run: pnpm run build | ||
- run: pnpm run test:coverage | ||
- uses: codecov/[email protected] | ||
with: | ||
files: packages/**/coverage/cobertura-coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
|
||
test-types: | ||
runs-on: ubuntu-22.04 | ||
|
This file contains 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 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 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,20 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { vi } from 'vitest' | ||
|
||
export const defaultGitValues = { | ||
branch: () => ({ | ||
current: '', | ||
}), | ||
show: () => {}, | ||
diffSummary: () => {}, | ||
revparse: () => {}, | ||
add: () => {}, | ||
commit: () => {}, | ||
push: () => {}, | ||
} | ||
|
||
export const mockSimpleGit = vi.fn(() => defaultGitValues) | ||
|
||
const simpleGit = () => mockSimpleGit() | ||
|
||
export { simpleGit } |
This file contains 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
47 changes: 47 additions & 0 deletions
47
packages/changesets-renovate/src/__tests__/__snapshots__/generate-changeset.test.ts.snap
This file contains 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,47 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`generate changeset file > should generate changeset file, but skip commit and push 1`] = ` | ||
[MockFunction spy] { | ||
"calls": [ | ||
[ | ||
".changeset/renovate-test.md", | ||
"--- | ||
'packageName': patch | ||
--- | ||
Updated dependency \`package\` to \`version\`. | ||
Updated dependency \`package2\` to \`version2\`. | ||
", | ||
], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
} | ||
`; | ||
exports[`generate changeset file > should generate changeset file, commit and push 1`] = ` | ||
[MockFunction spy] { | ||
"calls": [ | ||
[ | ||
".changeset/renovate-test.md", | ||
"--- | ||
'packageName': patch | ||
--- | ||
Updated dependency \`package\` to \`version\`. | ||
Updated dependency \`package2\` to \`version2\`. | ||
", | ||
], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
} | ||
`; |
Oops, something went wrong.