Skip to content

Commit 4c1caaf

Browse files
committed
Assert the install command is invoked always when pruning
1 parent e098cdb commit 4c1caaf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/spec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,14 @@ describe('checkDependencies', () => {
550550
`Expected version ${ depVersion } not to match ${ versionRange }`
551551
);
552552

553+
// Our fake jQuery copy contains only package.json but the true one has the /dist/
554+
// sub-directory. We'll use it to check if the `install` command was invoked
555+
// when technically not needed as we require it now always when pruning.
556+
assert.strictEqual(
557+
fs.existsSync(`${ fixtureCopyDir }/${ depsDirName }/jquery/dist`),
558+
false
559+
);
560+
553561
Promise
554562
.all([])
555563
.then(() => fs.remove(fixtureCopyDir))
@@ -560,6 +568,12 @@ describe('checkDependencies', () => {
560568
checkGitUrls: true,
561569
install: true,
562570
}, output => {
571+
// See the comment at the analogous assertion above.
572+
assert.strictEqual(
573+
fs.existsSync(`${ fixtureCopyDir }/${ depsDirName }/jquery/dist`),
574+
true
575+
);
576+
563577
// The functions is supposed to not fail because it's instructed to do
564578
// `npm install`/`bower install`.
565579
assert.deepEqual(output.error,

0 commit comments

Comments
 (0)