Skip to content

Commit 71c8216

Browse files
committed
[skip changelog] Change tests to resemble real usecase
1 parent 1099172 commit 71c8216

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

__tests__/git.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('Git commands', () => {
7272

7373
const settings = {} as Settings
7474
settings.gitPath = await io.which('git', true)
75-
settings.tagRegex = /[0-9]+\.[0-9]+\.[0-9]+.*/
75+
settings.tagRegex = RegExp('[0-9]+.[0-9]+.[0-9]+.*', 'i')
7676
const g = new Git(settings)
7777

7878
await createAndCommitFile('first', 'First commit', cwd)
@@ -88,7 +88,7 @@ describe('Git commands', () => {
8888

8989
const settings = {} as Settings
9090
settings.gitPath = await io.which('git', true)
91-
settings.tagRegex = /[0-9]+\.[0-9]+\.[0-9]+.*/
91+
settings.tagRegex = RegExp('[0-9]+.[0-9]+.[0-9]+.*', 'i')
9292
const g = new Git(settings)
9393

9494
await createAndCommitFile('first', 'First commit', cwd)
@@ -104,7 +104,7 @@ describe('Git commands', () => {
104104

105105
const settings = {} as Settings
106106
settings.gitPath = await io.which('git', true)
107-
settings.tagRegex = /.*/
107+
settings.tagRegex = RegExp('.*', 'i')
108108
const g = new Git(settings)
109109

110110
await createAndCommitFile('first', 'First commit', cwd)
@@ -122,7 +122,7 @@ describe('Git commands', () => {
122122

123123
const settings = {} as Settings
124124
settings.gitPath = await io.which('git', true)
125-
settings.tagRegex = /[0-9]+\.[0-9]+\.[0-9]+.*/
125+
settings.tagRegex = RegExp('[0-9]+.[0-9]+.[0-9]+.*', 'i')
126126
const g = new Git(settings)
127127

128128
await createAndCommitFile('first', 'First commit', cwd)
@@ -140,7 +140,7 @@ describe('Git commands', () => {
140140

141141
const settings = {} as Settings
142142
settings.gitPath = await io.which('git', true)
143-
settings.tagRegex = /[0-9]+\.[0-9]+\.[0-9]+.*/
143+
settings.tagRegex = RegExp('[0-9]+.[0-9]+.[0-9]+.*', 'i')
144144
const g = new Git(settings)
145145

146146
await createAndCommitFile('first', 'First commit', cwd)
@@ -251,7 +251,7 @@ describe('Git commands', () => {
251251

252252
const settings = {} as Settings
253253
settings.gitPath = await io.which('git', true)
254-
settings.filterRegex = /^\[skip\].*/
254+
settings.filterRegex = RegExp('^\\[skip\\].*', 'i')
255255
const g = new Git(settings)
256256

257257
await createAndCommitFile('first', 'First commit', cwd)
@@ -277,7 +277,7 @@ describe('Git commands', () => {
277277

278278
const settings = {} as Settings
279279
settings.gitPath = await io.which('git', true)
280-
settings.filterRegex = /^\[SkIp\].*/i
280+
settings.filterRegex = RegExp('^\\[SkIp\\].*', 'i')
281281
const g = new Git(settings)
282282

283283
await createAndCommitFile('first', 'First commit', cwd)

0 commit comments

Comments
 (0)