Last active
August 29, 2015 13:56
-
-
Save jfirebaugh/9145774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: NPM notifies me when my dependencies are out of date | |
In order to avoid accidentally running the tests against out of | |
date dependencies, npm should notify me when I try to do so. | |
Scenario: | |
Given I have a package.json that declares a dependency on [email protected] | |
And I have run `npm install` and installed [email protected] | |
And my coworker updates package.json to depend on [email protected] | |
When I pull that change and run `npm test` | |
Then I should get an error | |
And my test script should not run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
"pretest": "npm ls --depth=Infinity > /dev/null", | |
"test": "mocha or whatever" | |
} | |
} |
Oh, cool, I didn’t even know "pretest" was a thing!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @Mr0grog for the suggestion: https://gist.github.com/Mr0grog/9145413