@@ -25,7 +25,7 @@ import { validate } from '../validation/validate';
2525jest . mock ( '../packageManager/npm' ) ;
2626// jest.mock('npm-registry-fetch');
2727
28- describe ( 'publish command (registry )' , ( ) => {
28+ describe ( 'publish command (npm )' , ( ) => {
2929 const npmMock = initNpmMock ( ) ;
3030
3131 let repositoryFactory : RepositoryFactory | undefined ;
@@ -110,7 +110,7 @@ describe('publish command (registry)', () => {
110110
111111 // If there's only the private package with a change file, nothing happens
112112 await publishWrapper ( parsedOptions ) ;
113- expect ( logs . mocks . log ) . toHaveBeenCalledWith ( 'Nothing to bump, skipping publish!' ) ;
113+ expect ( logs . mocks . log ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Nothing to bump - skipping publish!' ) ) ;
114114 expect ( logs . mocks . warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Change detected for private package foopkg' ) ) ;
115115 expect ( logs . mocks . error ) . not . toHaveBeenCalled ( ) ;
116116 expect ( npmMock . getPublishedVersions ( 'foopkg' ) ) . toBeUndefined ( ) ;
@@ -132,10 +132,9 @@ describe('publish command (registry)', () => {
132132 [log] OK!
133133
134134 [log]
135- [log]
136- Preparing to publish
137- [log]
138- Publishing with the following configuration:
135+ [log] Preparing to publish
136+
137+ [log] Publishing with the following configuration:
139138
140139 registry: fake
141140
@@ -150,8 +149,8 @@ describe('publish command (registry)', () => {
150149
151150
152151 [log] Creating temporary publish branch publish_<timestamp>
153- [log]
154- Bumping versions and publishing packages to npm registry
152+
153+ [log] Bumping versions and publishing packages to npm registry
155154
156155 [log] Removing change files:
157156 [log] - publicpkg-<guid>.json
@@ -171,8 +170,9 @@ describe('publish command (registry)', () => {
171170
172171 [log]
173172 [log] Skipping git push and tagging
174- [log]
175- Cleaning up
173+
174+ [log] Cleaning up
175+
176176 [log] git checkout master
177177 [log] deleting temporary publish branch publish_<timestamp>"
178178 ` ) ;
@@ -210,7 +210,7 @@ describe('publish command (registry)', () => {
210210 // initial validate() isn't relevant here
211211 await publish ( options , createCommandContext ( parsedOptions ) ) ;
212212
213- expect ( logs . mocks . log ) . toHaveBeenCalledWith ( 'Nothing to bump, skipping publish!' ) ;
213+ expect ( logs . mocks . log ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Nothing to bump - skipping publish!' ) ) ;
214214 expect ( logs . mocks . warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'Change detected for private package bar' ) ) ;
215215 expect ( logs . mocks . warn ) . toHaveBeenCalledWith (
216216 expect . stringContaining ( 'Change detected for nonexistent package fake' )
0 commit comments