UNPKG

s3-orm

Version:

Object-Relational Mapping (ORM) interface for Amazon S3, enabling model-based data operations with indexing and querying capabilities

35 lines (22 loc) 714 B
import {IntegerType} from './IntegerType'; describe('IntegerType', () => { test('name', () => { expect(IntegerType.typeName).toEqual('integer'); }) test('isNumeric', () => { expect(IntegerType.isNumeric).toEqual(true); }) test('encode', () => { const testStr = IntegerType.mock(); const encoded = IntegerType.encode(testStr); expect(typeof encoded).toEqual(`string`); expect(encoded).toEqual(testStr+''); return; }) test('decode', () => { const encoded = IntegerType.encode('6'); const parsed = IntegerType.decode(encoded); expect(parsed).toEqual(6); return; }) });