Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

test: Use correct path for devDependency in --production test #8985

Closed
wants to merge 1 commit into from

Conversation

bengl
Copy link
Contributor

@bengl bengl commented Jul 17, 2015

In messing around a bit with --production I noticed this one.

The test case here was creating a package that wasn't expected (devDependency versus dev-dependency). As a result, if the test was forced to fail (for example, get rid of the --production argument), it was failing with incorrect and not-as-helpful errors.

Now, with this commit, if you remove the --production argument, you get the following output from the test:

test/tap/install-cli-production.js .................... 4/6
  'npm install --production' should only install dependencies
  not ok npm install did not raise error code
    +++ found
    --- wanted
    -0
    +1
    compare: ===
    at:
      file: test/tap/install-cli-production.js
      line: 69
      column: 7
    stack: |
      test/tap/install-cli-production.js:69:7
      f (node_modules/once/once.js:17:25)
      ChildProcess.<anonymous> (test/common-tap.js:56:5)
      maybeClose (child_process.js:1015:16)
      Socket.<anonymous> (child_process.js:1183:11)
      Pipe.close (net.js:485:12)

  'npm install --production' should only install dependencies
  not ok devDependency was NOT installed
    at:
      file: test/tap/install-cli-production.js
      line: 76
      column: 7
    stack: |
      test/tap/install-cli-production.js:76:7
      f (node_modules/once/once.js:17:25)
      ChildProcess.<anonymous> (test/common-tap.js:56:5)
      maybeClose (child_process.js:1015:16)
      Socket.<anonymous> (child_process.js:1183:11)
      Pipe.close (net.js:485:12)

total ................................................. 4/6

@othiym23 othiym23 added this to the 2.x-next-next milestone Jul 21, 2015
@othiym23 othiym23 modified the milestones: 3.x-next, 2.x-next Jul 28, 2015
iarna pushed a commit that referenced this pull request Aug 1, 2015
@iarna
Copy link
Contributor

iarna commented Aug 3, 2015

This shipped in 3.2.1

@iarna iarna closed this Aug 3, 2015
@bengl
Copy link
Contributor Author

bengl commented Aug 3, 2015

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants