Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions packages/build/src/npm-packages/publish.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import sinon from 'sinon';
import { publishToNpm } from './publish';

describe('npm-packages publishToNpm', function () {
let listNpmPackages: SinonStub;
let spawnSync: SinonStub;
const lernaBin = path.resolve(
__dirname,
Expand All @@ -19,18 +18,11 @@ describe('npm-packages publishToNpm', function () {
);

beforeEach(function () {
listNpmPackages = sinon.stub();
spawnSync = sinon.stub();
});

it('calls lerna to publish packages for a real version', function () {
const packages = [
{ name: 'packageA', version: '0.7.0' },
{ name: 'mongosh', version: '1.2.0' },
];
listNpmPackages.returns(packages);

publishToNpm({ isDryRun: false }, listNpmPackages);
publishToNpm({ isDryRun: false }, spawnSync);

expect(spawnSync).to.have.been.calledWith(
lernaBin,
Expand Down
10 changes: 5 additions & 5 deletions packages/build/src/npm-packages/push-tags.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('pushing tags', function () {
'-m',
`v${mongoshVersion}`,
]);
expect(spawnSync).calledWith('git', ['push', '--follow-tags']);
expect(spawnSync).calledWith('git', ['push', '--tags']);
});

it('pushes only package tags when using auxiliary packages', function () {
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('pushing tags', function () {
'-m',
`v${mongoshVersion}`,
]);
expect(spawnSync).calledWith('git', ['push', '--follow-tags']);
expect(spawnSync).calledWith('git', ['push', '--tags']);
});

it('skips pushing version tags which already exist', function () {
Expand Down Expand Up @@ -191,7 +191,7 @@ describe('pushing tags', function () {
'-m',
`v${mongoshVersion}`,
]);
expect(spawnSync).calledWith('git', ['push', '--follow-tags']);
expect(spawnSync).calledWith('git', ['push', '--tags']);
});

it('skips mongosh release tag push if it exists', function () {
Expand All @@ -214,7 +214,7 @@ describe('pushing tags', function () {
'-m',
`v${mongoshVersion}`,
]);
expect(spawnSync).calledWith('git', ['push', '--follow-tags']);
expect(spawnSync).calledWith('git', ['push', '--tags']);
});

it('skips tag push if it is a dry run', function () {
Expand All @@ -238,7 +238,7 @@ describe('pushing tags', function () {
`v${mongoshVersion}`,
]);

expect(spawnSync).not.calledWith('git', ['push', '--follow-tags']);
expect(spawnSync).not.calledWith('git', ['push', '--tags']);
});
});
});
Loading