Configure code coverage in code

This commit is contained in:
Kenny628 2023-08-27 18:14:18 +08:00
parent 13750cd360
commit f1303483f3
2 changed files with 5 additions and 0 deletions

View File

@ -13,5 +13,9 @@ export default defineConfig({
framework: 'vue',
bundler: 'vite',
},
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config)
return config;
}
},
})

View File

@ -17,6 +17,7 @@
// ***********************************************************
import './commands'
import type { StyleOptions } from '@cypress/mount-utils'
import '@cypress/code-coverage/support'
import type { MountingOptions } from '@vue/test-utils'
import { mount } from 'cypress/vue'
import registerGlobalComponents from 'src/plugins/global-components'