Skip to content

Commit

Permalink
Merge #372: Update node dependencies
Browse files Browse the repository at this point in the history
5864d80 fix: [#183] update node dependencies (Jose Celano)

Pull request description:

  Update node dependencies:

  - #368
  - #367
  - #365
  - #363
  - #341
  - #317

Top commit has no ACKs.

Tree-SHA512: 8de64037268e125fe7c19a7b4cf5950b4a7a62ed669abd43bbf88c41560b1471c79aabde3247ce83737618d2749ab190976a31c267e7d12e3828dea97739d615
  • Loading branch information
josecelano committed Oct 24, 2022
2 parents e6bf55f + 5864d80 commit 3974a18
Show file tree
Hide file tree
Showing 11 changed files with 1,351 additions and 455 deletions.
10 changes: 5 additions & 5 deletions __tests__/unit/commit-body.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body without the mandatory namespace field', () => {
Expand All @@ -40,7 +40,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body with a wrong namespace value', () => {
Expand All @@ -57,7 +57,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body without the mandatory metadata field', () => {
Expand All @@ -70,14 +70,14 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should fail when constructing with a non-JSON content', () => {
const invalidContent = (): CommitBody => {
return new CommitBody('this is not a JSON content')
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('could be built from a Message', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/commit-hash.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('CommitHash', () => {
return new CommitHash('ad5cea63-8f69d-955d8-e5f0da-9f675d5ba75f')
}

expect(longHash).toThrowError()
expect(shortHash).toThrowError()
expect(nonSHA1Hash).toThrowError()
expect(longHash).toThrow()
expect(shortHash).toThrow()
expect(nonSHA1Hash).toThrow()
})

it('should compare two commit hashes', () => {
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/commit-subject-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('CommitSubjectParser', () => {
return parser.getMessageKey().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the queue name from a commit subject', () => {
Expand All @@ -38,7 +38,7 @@ describe('CommitSubjectParser', () => {
return parser.getQueueName().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the job reference (commit hash) from a commit subject', () => {
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobRef().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should fail when the job reference prefix exists but the reference value is missing in a commit subject', () => {
Expand All @@ -77,7 +77,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobRef().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should return a Null Commit when the job reference does not exist', () => {
Expand All @@ -96,7 +96,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobId()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the job id from a commit subject', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/job-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ describe('JobId', () => {
return new JobId(0)
}

expect(negativeJobId).toThrowError()
expect(NaNJobId).toThrowError()
expect(zeroJobId).not.toThrowError()
expect(negativeJobId).toThrow()
expect(NaNJobId).toThrow()
expect(zeroJobId).not.toThrow()
})

it('should compare two JobIds', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/queue-name.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ describe('QueueName', () => {
)
}

expect(invalidCharacters).toThrowError()
expect(emptyString).toThrowError()
expect(longString).toThrowError()
expect(invalidCharacters).toThrow()
expect(emptyString).toThrow()
expect(longString).toThrow()
})

it('should transform blank spaces of the queue name into dashes', () => {
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('Queue', () => {

const expectedError = `Can't start job. Previous message from this job is not a new job message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should fail when trying to start the same job twice', async () => {
Expand All @@ -140,7 +140,7 @@ describe('Queue', () => {
return queue.markJobAsStarted(dummyPayload())
}

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should allow marking a job as finished', async () => {
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('Queue', () => {

const expectedError = `Can't finish job. Previous message from this job is not a job started message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should fail when trying to finish a job that does not exists', async () => {
Expand All @@ -207,7 +207,7 @@ describe('Queue', () => {

const expectedError = `Can't finish job. Previous message from this job is not a job started message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should allow to specify the commit author', async () => {
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('Queue', () => {

const expectedError = `Git dir: ${gitRepo.getDirPath()} has not been initialized`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should return all the messages in the queue', async () => {
Expand Down
Loading

0 comments on commit 3974a18

Please sign in to comment.