Skip to content

Modernisation 27 - Switch to mocha bdd style in preparation for moving to node test runner#831

Merged
cressie176 merged 1 commit intomainfrom
amqplib-modernisation-27-mocha-describe
Mar 28, 2026
Merged

Modernisation 27 - Switch to mocha bdd style in preparation for moving to node test runner#831
cressie176 merged 1 commit intomainfrom
amqplib-modernisation-27-mocha-describe

Conversation

@cressie176
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread biome.json
"noPrototypeBuiltins": "error",
"noVar": "error"
"noVar": "error",
"noExportsInTest": "off"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the tests have describe / it, biome recognises them as tests and complains about the exports

Comment thread test/callback_api.js
}
describe('Error handling', () => {

it('Throw error in connection open callback', (done) => {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since amqplib no longer supports v0.8 or earlier, we no longer have to worry about ignoring the test in earlier version

Comment thread test/channel.js
.then((open) => {
send(defs.ChannelCloseOk, {}, open.channel);
})
.then(succeed(done), fail(done)))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the formatting that was somehow missed in the previous PR

Comment thread test/channel.js
})
.then(succeed(done), fail(done));
}
));
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed some more formatting that was previously missed in the previous PR

Comment thread test/channel.js
send(defs.BasicDeliver, DELIVER_FIELDS, ch, Buffer.from(''));
}, done);
}
));
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More formatting fixes

@cressie176 cressie176 changed the base branch from amqplib-modernisation-26-format-tests to main March 28, 2026 10:41
@cressie176 cressie176 merged commit e30c43f into main Mar 28, 2026
@cressie176 cressie176 deleted the amqplib-modernisation-27-mocha-describe branch March 28, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant