irc-framework icon indicating copy to clipboard operation
irc-framework copied to clipboard

WIP Protocol testrunner

Open prawnsalad opened this issue 5 years ago • 5 comments

prawnsalad avatar Oct 08 '20 00:10 prawnsalad

Todo:

  • [ ] RESET command needs to wait until the bot instance has been fully destroyed before re-creating it
  • [ ] Go over the commands. READWAIT and EVENTWAIT feels weird to use in a script
  • [ ] Document each script command

prawnsalad avatar Oct 08 '20 00:10 prawnsalad

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 avatar Oct 08 '20 07:10 xPaw

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.

xPaw avatar Oct 08 '20 08:10 xPaw

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?

prawnsalad avatar Oct 08 '20 11:10 prawnsalad

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?

xPaw avatar Oct 08 '20 11:10 xPaw