@@ -5,7 +5,7 @@ beforeAll(async () => {
5
5
} ) ;
6
6
7
7
test ( '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' , [ ] ) ;
9
9
expect ( nextVersion ) . toBe ( '0.0.1-preview.0' ) ;
10
10
} ) ;
11
11
@@ -50,7 +50,7 @@ test('should use bump latest tag if one tag was skipped', () => {
50
50
} ) ;
51
51
52
52
test ( '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' , [
54
54
'0.0.1-preview.3' ,
55
55
'0.0.1-preview.2' ,
56
56
'0.0.1-preview.1' ,
@@ -65,7 +65,7 @@ test('should use pre-release version from pre-release package.json if no tag mat
65
65
'0.0.1-preview.3' ,
66
66
'0.0.1-preview.2' ,
67
67
'0.0.1-preview.1' ,
68
- '0.0.1-preview.0'
68
+ '0.0.1-preview.0' ,
69
69
] ) ;
70
70
expect ( nextVersion ) . toBe ( '0.1.0-preview.0' ) ;
71
71
} ) ;
@@ -84,16 +84,12 @@ test('should bump final version if tag already exists and ends with 0', () => {
84
84
} ) ;
85
85
86
86
test ( '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' ] ) ;
90
88
expect ( nextVersion ) . toThrow ( Error ) ;
91
89
} ) ;
92
90
93
91
test ( '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' ] ) ;
97
93
expect ( nextVersion ) . toThrow ( Error ) ;
98
94
} ) ;
99
95
@@ -102,4 +98,3 @@ test('should throw an error for wrong versions', () => {
102
98
expect ( ( ) => getNextVersion ( '1.0' , [ ] ) ) . toThrow ( Error ) ;
103
99
expect ( ( ) => getNextVersion ( '~1.0.0' , [ ] ) ) . toThrow ( Error ) ;
104
100
} ) ;
105
-
0 commit comments