Skip to content

Commit

Permalink
added subevent test
Browse files Browse the repository at this point in the history
  • Loading branch information
Faibk committed Nov 15, 2017
1 parent 484e32b commit 76da92e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/docs/discriminators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ describe('discriminator docs', function () {

assert.equal(doc.events[0].sub_events[0].message, 'test1');
assert.equal(doc.events[0].message, 'hello');
assert.ok(doc.events[0] instanceof SubEvent);
assert.ok(doc.events[0].sub_events[0] instanceof SubEvent);

assert.equal(doc.events[1].sub_events[0].sub_events[0].message, 'test3');
assert.equal(doc.events[1].message, 'world');
assert.ok(doc.events[1] instanceof SubEvent);
assert.ok(doc.events[1].sub_events[0].sub_events[0] instanceof SubEvent);

doc.events.push({kind:'SubEvent', sub_events:[{kind:'SubEvent', sub_events:[], message:'test4'}], message:'pushed'});
return doc.save();
Expand Down

0 comments on commit 76da92e

Please sign in to comment.