hubotio / hubot

A customizable life embetterment robot.
https://hubotio.github.io/hubot/
MIT License
16.66k stars 3.75k forks source link

Ship test adapter 🙏 #1743

Closed KeesCBakker closed 1 week ago

KeesCBakker commented 2 weeks ago

Great job on the rewrite to .mjs, what a task! As I'm upgrading I found my dependencies on hubot-mock-adapter breaking.

When clicking through the Hubot code I've found that Hubot has it's own fixture for it: https://github.com/hubotio/hubot/blob/main/test/fixtures/MockAdapter.mjs, which looks very very very similar to what that package was doing: https://github.com/hubotio/hubot/blob/main/test/fixtures/MockAdapter.mjs

My proposal: shall we ship this test adapter in the NPM package?

joeyguerra commented 2 weeks ago

The intent is to reduce external dependencies. Can you post the problematic code?

KeesCBakker commented 2 weeks ago

It is a bit hard, because it is a chain:

But this might all be fixed now that we ship it with our package. So now I'm going back to see if I can drop the dependency on the hubot-mock-adapter.

I have a blog post that uses the hubot-mock-adapter. I'll be checking what I'll need to change over there as well: https://keestalkstech.com/2023/08/hubot-testing-revisited/

KeesCBakker commented 2 weeks ago

Here is a bit of a write-up on what I'm going for: https://keestalkstech.com/2024/11/hubot-testing-revisted-again-hubot-11/