-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 2: Test suite failed to run due to: SyntaxError: Unexpected token { #2
Comments
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
Installing the specific version solves the problem |
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 |
@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.
Using newer versions for jest related libraries
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:
for the same data. State changes..
The text was updated successfully, but these errors were encountered: