We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7fc6089 + 320eb8c commit 691691eCopy full SHA for 691691e
__tests__/index.test.ts
@@ -609,4 +609,13 @@ describe('cast', () => {
609
test('casts int to number', () => {
610
expect(cast({ name: 'test', type: 'INT8' }, '12')).toEqual(12)
611
})
612
+
613
+ test('casts float to number', () => {
614
+ expect(cast({ name: 'test', type: 'FLOAT32' }, '2.32')).toEqual(2.32)
615
+ expect(cast({ name: 'test', type: 'FLOAT64' }, '2.32')).toEqual(2.32)
616
+ })
617
618
+ test('casts JSON string to JSON object', () => {
619
+ expect(cast({ name: 'test', type: 'JSON' }, '{ "foo": "bar" }')).toStrictEqual({ foo: 'bar' })
620
621
0 commit comments