vue-jest
vue-jest copied to clipboard
Jest Vue transformer
My project is Vue 2.x. I am using `@babel/plugin-proposal-optional-chaining` and I have a line of code in my component.vue file that uses "?" ``` this.$refs.refreshBtn?.$el.addEventListener("animationend", _ => { ... });...
When importing a javascript based vue component inside of typescript vue component I receive the following error: ``` ● Test suite failed to run Jest encountered an unexpected token Jest...
Currently JEST collects coverage for section but not for section:  Is there any way to collect coverage for ? I guess that maintainers of "jest" will not work on...
I have Jest setup to test files with `@vue/vue3-jest` and it runs all of the Vue tests just fine, however I came across a peculiar issue regarding test coverage -...
This PR: - updates all Vue 2 dependencies (`vue` and `vue-template-compiler`) to the latest version (`2.7.7`) - adds support for parsing components using the `` syntax in Vue 2.7 components...
I've been trying to get jest to work properly with a Vue 2 + Vite project. Jest reports pass/fail as I would expect, but the coverage report seems incorrect. Link...
jest: 28.1.3, vue-jest: 3.0.7 vue: 2.7.8 my jest.config.js is: > module.exports = { clearMocks: true, collectCoverage: true, collectCoverageFrom: ['src/**/*.{js,vue}', '!**/node_modules/**'], transform: { '^[^.]+.vue$': 'vue-jest', '^.+\\.js$': 'babel-jest', '.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': './mocks/fileMock.js', }, coverageThreshold:...
First of all, I'm new to this testing aspect but I really want to learn it. I, unfortunately, faced an Issue with the coverage. It does simply not work. The...
In my jest.config.js (relevant bits): ``` const VueTemplateBabelCompiler = require('vue-template-babel-compiler'); module.exports = { // ... transform: { "\\.(js|ts|jsx|tsx)$": "babel-jest", "\\.vue$": "@vue/vue2-jest", }, globals: { '@vue/vue2-jest': { templateCompiler: { compiler: VueTemplateBabelCompiler,...
I have to add a second script tag because I need to export a variable for usage in storybook and jest. In storybook all is well, however Jest gives me...