Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Add more tests #29

Closed
18 of 24 tasks
Throne3d opened this issue Jul 30, 2017 · 5 comments
Closed
18 of 24 tasks

Add more tests #29

Throne3d opened this issue Jul 30, 2017 · 5 comments
Labels

Comments

@Throne3d
Copy link
Owner

Throne3d commented Jul 30, 2017

There are, um, quite a few to be done, and commit d8164ec is the start of me listing a bunch of them.

  • client joins opt.channels on receiving motd (27e1af8)
  • client emits error events properly (411f414)
  • client handles topic-related events (246ec76, dcdd93e)
  • client handles channel-list-related events
  • interface handles errors in the raw handler (e293980)
  • interface handles disconnecting when disconnected (50981b5)
  • command queue works as intended (22afe66)
  • test send (06ce213)
  • various API methods should work as intended; test they call the correct values of send as well as any specific other details
  • CTCP is handled properly
  • client.out works as expected (3eff8bf, Can't turn off debug logging #34)
  • interface sends both case-preserving and case-lowered events for cased channels (201258f)
  • client handles self-events properly:
    • for NICK it then alters self.nick
    • for .join and .part it adds to / removes from self.opt.channels (536c9bd, f6f3294)
  • client handles PRIVMSGs properly and downcases relevantly (70cfc67, 1380130)
  • client handles INVITEs properly (bdaf73a)
  • ping timer works as expected (fc6d661, fd790d1)
  • individual user events are handled and emitted as expected, not just when combined (test the internal state more thoroughly and more specifically)
  • look into reducing the wait time on tests that currently use a timeout to ensure things don't happen

There's also a heck of a lot of other commands that don't seem tested in the main raw handler. It's probably a good idea to try joining a server, simulating some interaction, and then replicating this with client methods and the mock and making sure the client has the right state at each stage, like was (approximately) done with 'joins, parts, renicks and quits' in test-user-events.js.

See #40 for some progress here.

@Throne3d Throne3d added the task label Jul 30, 2017
@Throne3d Throne3d changed the title Add tests Add more tests Aug 7, 2017
@Throne3d
Copy link
Owner Author

And in #37 we've swapped to Mocha for the test framework.

@Throne3d Throne3d mentioned this issue Sep 26, 2017
15 tasks
@Throne3d
Copy link
Owner Author

Throne3d commented Sep 27, 2017

More progress has been made. Now up to 80.76%.

@Throne3d
Copy link
Owner Author

82.29%.

@Throne3d
Copy link
Owner Author

Throne3d commented Sep 29, 2017

(Remaining progress has been moved here after the top-level issue text reverted to an older state by accident).

Recent progress:

  • test.js REPL is slightly improved (accepts command-line parameter to put you on a specific IRC server, has a useful new printRecent function to print latest raws and doesn't show them all by default) (b71a279)
  • rpl_isupport (bba3af9)
  • rpl_myinfo (f4d5a99)
  • notice from server (8f79775)
  • CTCP (af84c15)
  • more of _speak (5e59e26)
  • notice, say (a81933d)

88.68%
90.89%
94.09%

  • who (f836350)
  • pass w/o sasl (d081b87)
  • webirc (9a69577)
  • connect qua api (cba1180)
  • localaddr?
  • auth fail, auth cert expired
  • raw error w/ reqDisconnect (839de73)
  • retryCount (f01915f), abort event (8d7806b)
  • ctcp notice (c58b10d)
  • channel lists (1852348)
  • self-events (NICK, QUIT, …?)
  • test individual raws more thoroughly as regards emission of events
  • KILL (cdb2c19)
  • leftover events (1370f41)
  • foreign (old) cyclingpingtimer events are ignored (2c2480d)

@Throne3d
Copy link
Owner Author

Throne3d commented Oct 9, 2017

Closing this in favor of ongoing progress, since the coverage is pretty high now.

@Throne3d Throne3d closed this as completed Oct 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant