Skip to content

Commit

Permalink
Create empty package.json in e2e test (#1401) (#1402)
Browse files Browse the repository at this point in the history
* Create empty package.json in e2e test

Create empty package.json in e2e test while installing packaged CLI to prevent installation issues.

* Use "npm init" to initialize package.json instead of just writing an empty object into it.

* Fix typo
  • Loading branch information
matoilic authored and gaearon committed Mar 5, 2017
1 parent 860f1c7 commit ebf5bd5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tasks/e2e-simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ mv package.json.orig package.json

# Install the CLI in a temporary location
cd "$temp_cli_path"

# Initialize package.json before installing the CLI because npm will not install
# the CLI properly in the temporary location if it is missing.
npm init --yes

# Now we can install the CLI from the local package.
npm install "$cli_path"

# Install the app in a temporary location
Expand Down

0 comments on commit ebf5bd5

Please sign in to comment.