-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
'use strict'; | ||
|
||
var NpmInstallTask = require('../../../lib/tasks/npm-install'); | ||
var MockUI = require('../../helpers/mock-ui'); | ||
var MockProject = require('../../helpers/mock-project'); | ||
var expect = require('chai').expect; | ||
|
||
var MockUI = require('../../helpers/mock-ui'); | ||
var expect = require('chai').expect; | ||
|
||
describe('npm install task', function() { | ||
var npmInstallTask; | ||
var ui; | ||
|
||
beforeEach(function() { | ||
var project = new MockProject({}); | ||
project.root = './tmp'; | ||
|
||
var project = { | ||
root: __dirname | ||
}; | ||
ui = new MockUI(); | ||
|
||
npmInstallTask = new NpmInstallTask({ | ||
ui: ui, | ||
project: project | ||
}); | ||
}); | ||
|
||
afterEach(function() { | ||
ui = undefined; | ||
npmInstallTask = undefined; | ||
}); | ||
|
||
it('skips npm installs if there is no package.json', function() { | ||
npmInstallTask.run({}); | ||
expect(ui.output).to.include('Skipping npm install: package.json not found'); | ||
}); | ||
}); | ||
}); |