Open juliolugo96 opened 3 years ago
Hmm. I have very little experience with Jest since I use Mocha for everything. I've tried to switch to Jest once a year since it came out, but I find myself much more productive with Mocha. Anyway, as a result of this I won't be much help. However, if you can comment with a link to a repo that demonstrates this exact problem, you're more likely to find one of the community members who might be able to troubleshoot. If you choose to do this, please keep the repo as simple as you possibly can so it's easier to isolate the problem. Thanks!
I had the same issue. I was able to fix it by adding an exclusion for feathers-vuex
via transformIgnorePatterns
in jest.config.js
- see https://cli.vuejs.org/config/#transpiledependencies for details.
module.exports = {
....
transformIgnorePatterns: ['/node_modules/(?!vue-awesome|feathers-vuex)']
};
Of course in your specific case you would omit vue-awesome
as you aren't using it. This might be worth mentioning in https://vuex.feathersjs.com/getting-started.html#project-configuration to accompany the various transpilation scenarios.
Thanks, @alzab. This definitely needs to go into the docs
First of all, Feathers is a charm. This is the first real issue I'm facing since I started working with it. Me and my friends have a massive respect for you, mr. @daffl, greetings from ULA - Venezuela.
Steps to reproduce
I'm trying to run Jest tests suite using
yarn run test
in a project that is usingfeathers-vuex
using the code I left below.Expected behavior
Test suite runs correctly.
Actual behavior
The problem goes with this line:
Particularly, I've this call in one of my inner components in VueJS, which seems to be failing:
I might think that this problem could be solved including Vuex and NuxtStore inside my test suite. However, the problem keeps showing up. I also tried to transpile that specific module with Babel, but the problem stands still. I don't know what to do at this point, honestly. I would appreciate your help.
My
jest.setup.js
:My test file looks like this:
Module versions (especially the part that's not working):
feathers-vuex 3.10.4
NodeJS version:
v12.16.1
Operating System:
Linux Mint 18.2 64-bit
Browser Version:
Google Chrome Version 84.0.4147.105 (Official Build) (64-bit)
React Native Version: N/A Module Loader: N/A