@@ -25,62 +25,6 @@ describe('npm-packages publishToNpm', function () {
2525 spawnSync = sinon . stub ( ) ;
2626 } ) ;
2727
28- it ( 'throws if mongosh is not existent when publishing all' , function ( ) {
29- const packages = [ { name : 'packageA' , version : '0.7.0' } ] ;
30- listNpmPackages . returns ( packages ) ;
31-
32- expect ( ( ) =>
33- publishToNpm (
34- { isDryRun : false , useAuxiliaryPackagesOnly : false } ,
35- listNpmPackages ,
36- markBumpedFilesAsAssumeUnchanged ,
37- spawnSync
38- )
39- ) . throws ( 'mongosh package not found' ) ;
40- } ) ;
41-
42- it ( 'takes mongosh version and pushes tags' , function ( ) {
43- const packages = [
44- { name : 'packageA' , version : '0.7.0' } ,
45- { name : 'mongosh' , version : '1.2.0' } ,
46- ] ;
47- listNpmPackages . returns ( packages ) ;
48-
49- publishToNpm (
50- { isDryRun : false , useAuxiliaryPackagesOnly : false } ,
51- listNpmPackages ,
52- markBumpedFilesAsAssumeUnchanged ,
53- spawnSync
54- ) ;
55-
56- expect ( spawnSync ) . calledWith ( 'git' , [ 'tag' , '-a' , '1.2.0' , '-m' , '1.2.0' ] ) ;
57- expect ( spawnSync ) . calledWith ( 'git' , [ 'push' , '--follow-tags' ] ) ;
58- } ) ;
59-
60- it ( 'does not manually push tags with auxiliary packages' , function ( ) {
61- const packages = [
62- { name : 'packageA' , version : '0.7.0' } ,
63- { name : 'mongosh' , version : '1.2.0' } ,
64- ] ;
65- listNpmPackages . returns ( packages ) ;
66-
67- publishToNpm (
68- { isDryRun : false , useAuxiliaryPackagesOnly : true } ,
69- listNpmPackages ,
70- markBumpedFilesAsAssumeUnchanged ,
71- spawnSync
72- ) ;
73-
74- expect ( spawnSync ) . not . calledWith ( 'git' , [
75- 'tag' ,
76- '-a' ,
77- '1.2.0' ,
78- '-m' ,
79- '1.2.0' ,
80- ] ) ;
81- expect ( spawnSync ) . not . calledWith ( 'git' , [ 'push' , '--follow-tags' ] ) ;
82- } ) ;
83-
8428 it ( 'calls lerna to publish packages for a real version' , function ( ) {
8529 const packages = [
8630 { name : 'packageA' , version : '0.7.0' } ,
0 commit comments