Skip to content

Commit

Permalink
test(event): Test is more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
jcowman2 committed Oct 31, 2018
1 parent c3372ba commit 9bfbf83
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/unit/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ describe("Events", function() {
]);
});

it("Invoking an EventQueue does not throw an error", function() {
it("Invoking an EventQueue works just like any other EventFunction", function() {
const spam = on("SPAM", game => {
game.output.write("Get spammed.");
});
Expand All @@ -374,6 +374,11 @@ describe("Events", function() {
const myGame = new GameInstance();

spam.then(spam)(myGame);

expect(myGame.output.lines).to.deep.equal([
{ data: "Get spammed.", id: 1, type: OutputLineType.NORMAL },
{ data: "Get spammed.", id: 2, type: OutputLineType.NORMAL }
]);
});

describe("QTests", function() {
Expand Down

0 comments on commit 9bfbf83

Please sign in to comment.