Open StefanoA1 opened 5 years ago
@eddyerburgh
Hi Stefano, thank you for your detailed report. As you have found, since publication there have been problems with chapter 2, mainly because the packages aren't locked to a specific version. This was a mistake on my part—I should have asked readers to install specific versions to avoid future problems. I'm going to add an errata to fix this. I'll also add an errata to fix the syntax errors you have found. Sorry for the mistakes in the code.
Running npm install --save-dev jest
and npm run test:unit
, where test:unit: jest --no-cache
, gives the following error:
ReferenceError: Unknown option: .caller. Check out http://babeljs.io/docs/usage/options/ for more information about options.
Installing the specific version solves the problem npm install --save-dev jest@23.6.0
Thanks, again I'm sorry for these problems. I should have specified a version in the original text
@sevillaarvin thanks you, i have same problem
Do you have the starting code for this book? I only see the completed project that isn't broken out into chapters when following along in the book.
@torressam333 you need to change branches. Each chapter X's starter code is at branch chapter-X
@eddyerburgh yes thank you. IDK why but I was confusing branches with directories. My bad. Thank you, sir.
PROBLEM:
I'm following the book I bought via the Manning website (Testing Vue.js Applications), so far so great with the explanations but I experienced a problem in the 2th chapter, because of the following:
Steps to reproduce:
Use a linux distro (I'm using ubuntu 18.04.2 right now, but happens the same with version 16.04) Install npm with nvm (I've done it several times for other apps and didn't encounter any problem with npm packages) Clone your repo, checkout to chapter-2 branch Just follow the book instructions until chapter 2.
Already tried with:
(I did follow step by step the instructions, carefully adding the transforms for jest in the package.json) Checking that the package.json has the same versions as your repo.
For, the record, the first sanity check didn't pass until I followed the steps that were only explained later on (adding additional dependencies and mods to the package.json).
The only thing that works is to completely ignore chapter 2 instructions, checkout to chapter-2 branch but replace the package.json with chapter-3 version, run a npm install and there you go, by the way the repo could use updated versions for Vue and Vue templates (at least version 2.5.18+ because vue test utils complains due to the sync mode)
Thanks for taking a look, btw I love the explanations of the book.
(Probable) Typos found:
chapter 5:
chapter 6: