Skip to content
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

Getting starting guide is missing a comma #1280

Closed
sasha42 opened this issue Jul 12, 2016 · 2 comments
Closed

Getting starting guide is missing a comma #1280

sasha42 opened this issue Jul 12, 2016 · 2 comments

Comments

@sasha42
Copy link

sasha42 commented Jul 12, 2016

There is a missing comma at the end of line 48 in README.md, in the getting started guide. If you add the comma to the packages.json, you will have your npm test run. Sorry can't produce a test case, but here is a screenshot of what happens:

screen shot 2016-07-12 at 07 19 49

The first one was without a package.json, second one was with a touched one, but with no npm init having been run. Is this an issue?


Here's what it looks like with the comma:

sasha@Sashas-MacBook-Air:~/Code/playground/jest$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

.....................


Is this ok? (yes)
sasha@Sashas-MacBook-Air:~/Code/playground/jest$ sudo npm install --save-dev jest-cli
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global marked@0.3.5 should be installed with -g
jest@1.0.0 /Users/sasha/Code/Playground/jest
└─┬ jest-cli@13.2.3
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
.....................
        └── lodash.keys@4.0.7

npm WARN jest@1.0.0 No repository field.

# This is where you add the scripts part of the
# getting started guide, into the package.json

sasha@Sashas-MacBook-Air:~/Code/playground/jest$ nano package.json

sasha@Sashas-MacBook-Air:~/Code/playground/jest$ npm test

> jest@1.0.0 test /Users/sasha/Code/Playground/jest
> jest

Using Jest CLI v13.2.3, jasmine2
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
  Error: Watchman error: unable to resolve root /Users/sasha/Code/Playground/jest: failed to opendir(/Users/sasha/Code/playground/jest): No such file or directory. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
 PASS  __tests__/sum_test.js (0.046s)
1 test passed (1 total in 1 test suite, run time 1.584s)
@cpojer
Copy link
Member

cpojer commented Jul 12, 2016

The example is correct. It is up to you to add the correct amount of commas to your package.json. We cannot know what your package.json looks like and if you add the "scripts" section as last item to your package.json, you will not be needing to add a comma. If you add it anywhere in between, you will.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants