Skip to content

Commit

Permalink
test(task): compat with Node >= 20.18.1
Browse files Browse the repository at this point in the history
Introduced by ba3753a
  • Loading branch information
julien-f committed Nov 26, 2024
1 parent a22e4a6 commit be05b69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions @vates/task/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('Task', function () {
it('throws if the task has not started yet', function () {
const task = createTask()

assert.throws(() => task.failure(error), { message: 'task has not started yet' })
assert.throws(() => task.failure(error), { message: /^task has not started yet\b/ })
})

it('throws if the task is running', function () {
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('Task', function () {

it('throws when the task is not started', function () {
const task = createTask()
assert.throws(() => task.set(name, value), { message: 'task has not started yet' })
assert.throws(() => task.set(name, value), { message: /^task has not started yet\b/ })
})

it(`emits an property message`, async function () {
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('Task', function () {
it('throws if the task has not started yet', function () {
const task = createTask()

assert.throws(() => task.success(result), { message: 'task has not started yet' })
assert.throws(() => task.success(result), { message: /^task has not started yet\b/ })
})

it('throws if the task is running', function () {
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('Task', function () {
describe(`#${type}()`, function () {
it('throws when the task is not started', function () {
const task = createTask()
assert.throws(() => task[type]('foo'), { message: 'task has not started yet' })
assert.throws(() => task[type]('foo'), { message: /^task has not started yet\b/ })
})

it(`emits an ${type} message`, async function () {
Expand Down

0 comments on commit be05b69

Please sign in to comment.