Skip to content

Commit

Permalink
test: add unknown type cursor test case
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin658 committed Apr 15, 2021
1 parent 8124221 commit 2d2f53d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/reflection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ describe('Reflect.getMetadata Date type is Object test', () => {

expect(decoded).to.be.a('date');
});

it('should throw error with object type and non date value', () => {
expect(() => encodeByType('object', { foo: 'bar' })).to.throw(/unknown type in cursor/);
});
});

0 comments on commit 2d2f53d

Please sign in to comment.