Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('works with monorepo', () => {
const output = [];
mockPrint(print, output);
expandPackageList.mockImplementationOnce(() => [
'/package-a',
'/package-b',
]);
runPublish({
isYarn: true,
config: {
publishCommand: ({ defaultCommand }) => defaultCommand,
monorepo: {},
},
releaseTag: 'latest',
dir: '.',
dryRun: false,
});
expect(output).toMatchInlineSnapshot(`
Array [
"› Publishing.",
it('works', () => {
expandPackageList.mockImplementationOnce(() => [
'packages/a',
'packages/b',
]);
const versionUpdated = jest.fn();
updateVersionMonorepo({
config: {
versionUpdated,
monorepo: {
packagesToBump: ['packages/*'],
mainVersionFile: 'lerna.json',
},
},
dir: '.',
nextVersion: '1.2.3',
releaseType: 'patch',
});