A Vite-native testing framework. It's fast!
(c) vitest.dev
🐊Putout plugin helps to migrate to migrate to latest version of vitest.
npm i @putout/plugin-vitest -D
{
"rules": {
"vitest/v3-apply-options-as-second-argument": "on",
"vitest/v3-apply-browser-instances": "on"
},
"plugins": ["vitest"]
}
Vitest 3.0 prints a warning if you pass down an object as a third argument to test or describe functions. Vitest 4.0 will throw an error if the third argument is an object.
(c) vitest.dev
Checkout in 🐊Putout Editor.
test('validation works', () => {
// ...
}, {
retry: 3,
});
test('validation works', {retry: 3}, () => {
// ...
});
Both
browser.name
andbrowser.providerOptions
will be removed in Vitest 4. Instead of them, use the newbrowser.instances
option.(c) vitest.dev
Checkout in 🐊Putout Editor.
export default defineConfig({
test: {
browser: {
name: 'chromium',
providerOptions: {
launch: {
devtools: true,
},
},
},
},
});
export default defineConfig({
test: {
browser: {
instances: [{
name: 'chromium',
providerOptions: {
launch: {
devtools: true,
},
},
}],
},
},
});
MIT