-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ONL-8065] Replace jest with vitest (#1737)
* [ONL-8065] feat: Replace jest with vitest. * [ONL-8065] chore: Configure vitest. * [ONL-8065] chore: Configure eslint rules. * [ONL-8065] chore: Replace jest with vitest in test setup/mocks/stubs. Converted them to TS too. * [ONL-8065] fix: Fixed CVueWrapper not having correct return values. * [ONL-8065] fix: Fixed $tooltipContainer global property can't be recognised by TS when testing ec-tooltip. * [ONL-8065] fix: Removed toMatchDiffSnapshot occurrences because they are not supported by vitest. Fixed random failures in dropdown-search when trying to find tabbableElement. * [ONL-8065] chore: Replaced jest with vitest in utils. * [ONL-8065] chore: Replaced jest with vitest in directives and reworked ec-tooltip tests. * [ONL-8065] chore: Replaced jest with vitest in hocs. * [ONL-8065] chore: Replaced jest with vitest in composables. * [ONL-8065] chore: Fixed wrong eslint file path used in src. * [ONL-8065] fix: Fixed coverage in tests reported by the vitest. * [ONL-8065] fix: More fixes related to coverage and replacing jest with vitest. * [ONL-8065] chore: Updated remaining snapshots. * [ONL-8065] chore: Migrated intl setup to TS. * [ONL-8065] fix: Fixed typing for VueWrapper * [ONL-8065] chore: Removed CVueWrapper as it is not needed anymore. * [ONL-8065] docs: Updated docs. * [ONL-8065] chore: Updated npmignore. * [ONL-8065] chore: Updated latest testing dependencies and removed unused packages. * [ONL-8065] chore: Removed testing-library as it is no longer required by VTU. * [ONL-8065] fix: Fixed missing types for fake-timers. * [ONL-8065] fix: Allowed expect inside beforeEach and afterEach blocks. * [ONL-8065] fix: Fixed comments in snapshots. * [ONL-8065] chore: Updated latest dependencies. * [ONL-8065] chore: Removed unused generic type. * 2.4.0
- Loading branch information
Showing
174 changed files
with
30,752 additions
and
35,675 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
const vitest = require('eslint-plugin-vitest'); | ||
|
||
module.exports = { | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/*.spec.js', | ||
'**/*.spec.ts', | ||
], | ||
plugins: ['vitest'], | ||
extends: [ | ||
'plugin:vitest/recommended', | ||
], | ||
globals: { | ||
...vitest.environments.env.globals, | ||
}, | ||
rules: { | ||
'vitest/consistent-test-filename': ['error', { pattern: '.*\\.spec\\.[tj]sx?$' }], | ||
'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }], | ||
'vitest/no-alias-methods': 'error', | ||
'vitest/no-disabled-tests': 'error', | ||
'vitest/no-duplicate-hooks': 'error', | ||
'vitest/no-focused-tests': 'error', | ||
'vitest/no-standalone-expect': ['error', { additionalTestBlockFunctions: ['beforeEach', 'afterEach'] }], | ||
'vitest/prefer-hooks-in-order': 'error', | ||
'vitest/prefer-hooks-on-top': 'error', | ||
'vitest/prefer-lowercase-title': ['error', { ignoreTopLevelDescribe: true }], | ||
'vitest/prefer-to-be': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
3ab4b7b
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.
Successfully deployed to the following URLs:
chameleon – ./
chameleon-git-master-ebury.vercel.app
chameleon-ebury.vercel.app
chameleon-dead-plane.vercel.app