@@ -37,10 +37,10 @@ describe('Git commands', () => {
37
37
38
38
it ( 'Verifies tag is returned if checked out on same commit' , async ( ) => {
39
39
const cwd = await initTestRepo ( )
40
+ process . chdir ( cwd )
40
41
41
42
const settings = { } as Settings
42
43
settings . gitPath = await io . which ( 'git' , true )
43
- settings . repoPath = cwd
44
44
const g = new Git ( settings )
45
45
46
46
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -52,10 +52,10 @@ describe('Git commands', () => {
52
52
53
53
it ( 'Verifies empty string is returned if no tag exists' , async ( ) => {
54
54
const cwd = await initTestRepo ( )
55
+ process . chdir ( cwd )
55
56
56
57
const settings = { } as Settings
57
58
settings . gitPath = await io . which ( 'git' , true )
58
- settings . repoPath = cwd
59
59
const g = new Git ( settings )
60
60
61
61
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -66,10 +66,10 @@ describe('Git commands', () => {
66
66
67
67
it ( 'Verifies empty string is returned if current tag does not match regex' , async ( ) => {
68
68
const cwd = await initTestRepo ( )
69
+ process . chdir ( cwd )
69
70
70
71
const settings = { } as Settings
71
72
settings . gitPath = await io . which ( 'git' , true )
72
- settings . repoPath = cwd
73
73
settings . tagRegex = / [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + .* /
74
74
const g = new Git ( settings )
75
75
@@ -82,10 +82,10 @@ describe('Git commands', () => {
82
82
83
83
it ( 'Verifies tag is returned if regex is matched' , async ( ) => {
84
84
const cwd = await initTestRepo ( )
85
+ process . chdir ( cwd )
85
86
86
87
const settings = { } as Settings
87
88
settings . gitPath = await io . which ( 'git' , true )
88
- settings . repoPath = cwd
89
89
settings . tagRegex = / [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + .* /
90
90
const g = new Git ( settings )
91
91
@@ -98,10 +98,10 @@ describe('Git commands', () => {
98
98
99
99
it ( 'Verifies previous tag is returned' , async ( ) => {
100
100
const cwd = await initTestRepo ( )
101
+ process . chdir ( cwd )
101
102
102
103
const settings = { } as Settings
103
104
settings . gitPath = await io . which ( 'git' , true )
104
- settings . repoPath = cwd
105
105
settings . tagRegex = ''
106
106
const g = new Git ( settings )
107
107
@@ -116,10 +116,10 @@ describe('Git commands', () => {
116
116
117
117
it ( 'Verifies empty string is returned if no previous tag matches regex' , async ( ) => {
118
118
const cwd = await initTestRepo ( )
119
+ process . chdir ( cwd )
119
120
120
121
const settings = { } as Settings
121
122
settings . gitPath = await io . which ( 'git' , true )
122
- settings . repoPath = cwd
123
123
settings . tagRegex = / [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + .* /
124
124
const g = new Git ( settings )
125
125
@@ -134,10 +134,10 @@ describe('Git commands', () => {
134
134
135
135
it ( 'Verifies previous matching tag is found with invalid tag inbetween' , async ( ) => {
136
136
const cwd = await initTestRepo ( )
137
+ process . chdir ( cwd )
137
138
138
139
const settings = { } as Settings
139
140
settings . gitPath = await io . which ( 'git' , true )
140
- settings . repoPath = cwd
141
141
settings . tagRegex = / [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + .* /
142
142
const g = new Git ( settings )
143
143
@@ -154,10 +154,10 @@ describe('Git commands', () => {
154
154
155
155
it ( 'Verifies all commits are returned when no refs are specified' , async ( ) => {
156
156
const cwd = await initTestRepo ( )
157
+ process . chdir ( cwd )
157
158
158
159
const settings = { } as Settings
159
160
settings . gitPath = await io . which ( 'git' , true )
160
- settings . repoPath = cwd
161
161
const g = new Git ( settings )
162
162
163
163
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -176,10 +176,10 @@ describe('Git commands', () => {
176
176
177
177
it ( 'Verifies log if from ref is specified' , async ( ) => {
178
178
const cwd = await initTestRepo ( )
179
+ process . chdir ( cwd )
179
180
180
181
const settings = { } as Settings
181
182
settings . gitPath = await io . which ( 'git' , true )
182
- settings . repoPath = cwd
183
183
const g = new Git ( settings )
184
184
185
185
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -197,10 +197,10 @@ describe('Git commands', () => {
197
197
198
198
it ( 'Verifies log if to ref is specified' , async ( ) => {
199
199
const cwd = await initTestRepo ( )
200
+ process . chdir ( cwd )
200
201
201
202
const settings = { } as Settings
202
203
settings . gitPath = await io . which ( 'git' , true )
203
- settings . repoPath = cwd
204
204
const g = new Git ( settings )
205
205
206
206
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -218,10 +218,10 @@ describe('Git commands', () => {
218
218
219
219
it ( 'Verifies log with from and to refs specified' , async ( ) => {
220
220
const cwd = await initTestRepo ( )
221
+ process . chdir ( cwd )
221
222
222
223
const settings = { } as Settings
223
224
settings . gitPath = await io . which ( 'git' , true )
224
- settings . repoPath = cwd
225
225
const g = new Git ( settings )
226
226
227
227
await createAndCommitFile ( 'first' , 'First commit' , cwd )
@@ -245,10 +245,10 @@ describe('Git commands', () => {
245
245
246
246
it ( 'Verifies log does not contain commits matching regex' , async ( ) => {
247
247
const cwd = await initTestRepo ( )
248
+ process . chdir ( cwd )
248
249
249
250
const settings = { } as Settings
250
251
settings . gitPath = await io . which ( 'git' , true )
251
- settings . repoPath = cwd
252
252
settings . filterRegex = / ^ \[ s k i p \] .* /
253
253
const g = new Git ( settings )
254
254
0 commit comments