kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
181 stars 64 forks source link

WIP Protocol testrunner #264

Open prawnsalad opened 3 years ago

prawnsalad commented 3 years ago

Todo:

xPaw commented 3 years ago

I feel like RESET is just asking for trouble with state that may not reset. Isn't it easier to just have separate test files?

xPaw commented 3 years ago

One thing that I just realized, is that we will probably want a mechanism to call methods on IrcClient to test that it sends correct command.

Something like:

CALL invite #chan someone
READ INVITE someone #chan

Things like inviteList might be trickier, as it needs a callback.

prawnsalad commented 3 years ago

we will probably want a mechanism to call methods on IrcClient

This is what hit me yesterday too. And to support something like EXPECT client bot.some.prop=foo for checking client vars.

Things like the bot.join() that's currently in test_protocol/ shouldn't be there and will be needed for only some tests so we need a way to mix js+the test script without it getting messy. I'm not entirely sure on the best way for this yet... ideas?

xPaw commented 3 years ago

Things like the bot.join()

Well this particular example would be solved by the ability to call methods on ircclient. If there needs to be a way to mix with js, perhaps such tests should just be written in JS entirely instead of being parsed from txt file?