Skip to content

Commit 2d2f53d

Browse files
committed
test: add unknown type cursor test case
1 parent 8124221 commit 2d2f53d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/reflection.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ describe('Reflect.getMetadata Date type is Object test', () => {
1616

1717
expect(decoded).to.be.a('date');
1818
});
19+
20+
it('should throw error with object type and non date value', () => {
21+
expect(() => encodeByType('object', { foo: 'bar' })).to.throw(/unknown type in cursor/);
22+
});
1923
});

0 commit comments

Comments
 (0)