Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Aug 16, 2023
1 parent 44e32fa commit b52721e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/dependency-manager-adapters/npm-adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('npmAdapter', () => {
let stubbedRun = generateMockRun(
[
{
command: 'npm install --no-shrinkwrap',
command: 'npm install --no-package-lock',
callback(command, args, opts) {
runCount++;
expect(opts).to.have.property('cwd', tmpdir);
Expand All @@ -105,7 +105,8 @@ describe('npmAdapter', () => {
});

await adapter._install();
expect(runCount).to.equal(2);
// checking for 3 commands because install checks for npm version too
expect(runCount).to.equal(3, 'both commands run');
});

it('runs npm prune and npm install with npm 4', async () => {
Expand Down Expand Up @@ -146,7 +147,8 @@ describe('npmAdapter', () => {
});

await adapter._install();
expect(runCount).to.equal(3, 'All three commands should run');
// checking for 4 commands because install checks for npm version too
expect(runCount).to.equal(4, 'All three commands should run');
});

it('uses managerOptions for npm commands', async () => {
Expand All @@ -155,7 +157,7 @@ describe('npmAdapter', () => {
let stubbedRun = generateMockRun(
[
{
command: 'npm install --no-optional --no-shrinkwrap',
command: 'npm install --no-optional --no-package-lock',
callback() {
runCount++;
return RSVP.resolve();
Expand All @@ -179,7 +181,8 @@ describe('npmAdapter', () => {
});

await adapter._install();
expect(runCount).to.equal(2);
// checking for 3 commands because install checks for npm version too
expect(runCount).to.equal(3, 'both commands run');
});

it('uses buildManagerOptions for npm commands', async () => {
Expand Down

0 comments on commit b52721e

Please sign in to comment.