Commit Graph

10 Commits

Author SHA1 Message Date
Ben Davies
4e9577a7e5 Trivia: modlog kicks and wins, clean up unit tests (#2740)
Unit tests were still not destroying a few users.
2016-09-08 02:37:21 -05:00
Taylor Everding
1a1f64fe95 Remove .js extension from requires (#2725) 2016-08-30 00:04:40 -05:00
Ben Davies
ecb00710a7 Trivia: dispose of extra users in unit tests (#2719) 2016-08-27 14:47:08 -05:00
Ben Davies
d88561b42e Trivia: properly dispose of trivia games in mode unit tests (#2718) 2016-08-27 02:39:22 -05:00
Guangcong Luo
4523078519 Refactor User#games from Map to Set
User#games no longer retains games; it instead gets them from
Rooms(roomid).game.

The Trivia tests needed to be fixed for fidelity to continue passing.
2016-08-27 02:16:58 -05:00
Ben Davies
5c4834f3fd Tests: tweak user mocks, add Connection tests, fix Trivia tests (#2682)
Worker mocks now have proper ids. Trivia tests now dispose of user objects
rather than letting them stay in memory for the rest of the tests.
2016-08-09 04:02:27 -05:00
Ben Davies
343c67b15f Trivia: lazy loading for modules in unit tests (#2677)
This makes it possible to refer to globals normally defined in production in the
outermost scope of the trivia module without making unit tests throw.
2016-08-08 14:43:01 -05:00
Ben Davies
febba6b362 Trivia: add /trivia leave, lower answering period to 10 seconds (#2674) 2016-08-06 14:20:58 -05:00
Ben Davies
0d2d73540d Trivia: add unit tests confirming if points given aren't NaN (#2661) 2016-08-01 15:03:04 -05:00
Ben Davies
d00ba49b1c Trivia: game management code rewrite (#2626)
Part 1 of the rewrite for the entire plugin
This is the rewrite of the classes and commands that handle running
trivia games. Several bugs that happened when running trivia games were
fixed, and unit tests were added to help keep them gone.
2016-07-31 18:29:51 -05:00