nuxt3-awesome-starter
nuxt3-awesome-starter copied to clipboard
adding jest as unit testing
still trying to add jest as unit testing, but still having a lot of problems because I don't really understand jest configuration. maybe someone wants to help with this progress.
jest config
module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'],
transform: {
'^.+\\.vue$': 'vue-jest',
},
testEnvironment: 'jsdom',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
},
}
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/viandwi24/nuxt3-awesome-starter/4Dw9RsBE72mZFqaoGhvnzypbhdtv
✅ Preview: https://nuxt3-awesome-starter-git-add-unit-testing-viandwi24.vercel.app
pr is delayed until the module nuxt3 test has finished. https://github.com/nuxt/framework/pull/2952
pr it will make changes to nuxt/test-utils. use vitest for better performance too.
Why don't you use vitest?
yes, as I said in the reply above, waiting for the progress of @nuxt/test-utils to finish in the https://github.com/nuxt/framework/pull/2952 reference.
where jest and vitest config are available, use vitest as the default config. for better performance.