@@ -5,7 +5,7 @@ beforeAll(async () => {
55} ) ;
66
77test ( 'should use version from package.json if no tag is available' , ( ) => {
8- const nextVersion = getNextVersion ( " 0.0.1-preview.0" , [ ] ) ;
8+ const nextVersion = getNextVersion ( ' 0.0.1-preview.0' , [ ] ) ;
99 expect ( nextVersion ) . toBe ( '0.0.1-preview.0' ) ;
1010} ) ;
1111
@@ -50,7 +50,7 @@ test('should use bump latest tag if one tag was skipped', () => {
5050} ) ;
5151
5252test ( 'should use major version from major package.json if no tag matched' , ( ) => {
53- const nextVersion = getNextVersion ( '0.0.1' , [
53+ const nextVersion = getNextVersion ( '0.0.1' , [
5454 '0.0.1-preview.3' ,
5555 '0.0.1-preview.2' ,
5656 '0.0.1-preview.1' ,
@@ -65,7 +65,7 @@ test('should use pre-release version from pre-release package.json if no tag mat
6565 '0.0.1-preview.3' ,
6666 '0.0.1-preview.2' ,
6767 '0.0.1-preview.1' ,
68- '0.0.1-preview.0'
68+ '0.0.1-preview.0' ,
6969 ] ) ;
7070 expect ( nextVersion ) . toBe ( '0.1.0-preview.0' ) ;
7171} ) ;
@@ -84,16 +84,12 @@ test('should bump final version if tag already exists and ends with 0', () => {
8484} ) ;
8585
8686test ( 'should throw an error if final version is already tagged and does not end with 0' , ( ) => {
87- const nextVersion = ( ) => getNextVersion ( '0.2.1' , [
88- '0.2.1' ,
89- ] ) ;
87+ const nextVersion = ( ) => getNextVersion ( '0.2.1' , [ '0.2.1' ] ) ;
9088 expect ( nextVersion ) . toThrow ( Error ) ;
9189} ) ;
9290
9391test ( 'should throw an error if pre-release version is already tagged and does not end with 0' , ( ) => {
94- const nextVersion = ( ) => getNextVersion ( '0.2.0-preview.1' , [
95- '0.2.0-preview.1' ,
96- ] ) ;
92+ const nextVersion = ( ) => getNextVersion ( '0.2.0-preview.1' , [ '0.2.0-preview.1' ] ) ;
9793 expect ( nextVersion ) . toThrow ( Error ) ;
9894} ) ;
9995
@@ -102,4 +98,3 @@ test('should throw an error for wrong versions', () => {
10298 expect ( ( ) => getNextVersion ( '1.0' , [ ] ) ) . toThrow ( Error ) ;
10399 expect ( ( ) => getNextVersion ( '~1.0.0' , [ ] ) ) . toThrow ( Error ) ;
104100} ) ;
105-
0 commit comments