VimŸUnDoåŸzYji© I“DÍHØ#«cO›Üw[¼ø7QÍ€" assert.equal(enumType,S ^ |;_Ðÿÿÿÿ^ |"õ€ import * as assert from 'assert'2import * as Typescript from '../../src/typescript''import Options from '../../src/options'const options = new Options({})describe('Typescript', () => {. describe('generateTableInterface', () => {3 it('empty table definition object', () => {^ const tableInterface = Typescript.generateTableInterface('tableName', {}, options)( assert.equal(tableInterface, '\n' +: ' export interface tableName {\n' + ' \n' + ' }\n' + ' ') }), it('table name is reserved', () => {\ const tableInterface = Typescript.generateTableInterface('package', {}, options)( assert.equal(tableInterface, '\n' +9 ' export interface package_ {\n' + ' \n' + ' }\n' + ' ') })( it('table with columns', () => {S const tableInterface = Typescript.generateTableInterface('tableName', {: col1: {udtName: 'name1', nullable: false},9 col2: {udtName: 'name2', nullable: false} }, options)( assert.equal(tableInterface, '\n' +: ' export interface tableName {\n' +9 ' col1: tableNameFields.col1;\n' +1 'col2: tableNameFields.col2;\n' + '\n' + ' }\n' + ' ') })1 it('table with reserved columns', () => {S const tableInterface = Typescript.generateTableInterface('tableName', {< string: {udtName: 'name1', nullable: false},< number: {udtName: 'name2', nullable: false},< package: {udtName: 'name3', nullable: false} }, options)( assert.equal(tableInterface, '\n' +: ' export interface tableName {\n' +> ' string: tableNameFields.string_;\n' +6 'number: tableNameFields.number_;\n' +8 'package: tableNameFields.package_;\n' + '\n' + ' }\n' + ' ') }) })( describe('generateEnumType', () => {" it('empty object', () => {E const enumType = Typescript.generateEnumType({}, options)% assert.equal(enumType,'') })' it('with enumerations', () => {: const enumType = Typescript.generateEnumType({5 enum1: ['val1','val2','val3','val4'],4 enum2: ['val5','val6','val7','val8'] }, options)" assert.equal(enumType,T 'export type enum1 = \'val1\' | \'val2\' | \'val3\' | \'val4\';\n' +S 'export type enum2 = \'val5\' | \'val6\' | \'val7\' | \'val8\';\n') }) })( describe('generateEnumType', () => {" it('empty object', () => {E const enumType = Typescript.generateEnumType({}, options)% assert.equal(enumType,'') })' it('with enumerations', () => {: const enumType = Typescript.generateEnumType({5 enum1: ['val1','val2','val3','val4'],4 enum2: ['val5','val6','val7','val8'] }, options)" assert.equal(enumType,T 'export type enum1 = \'val1\' | \'val2\' | \'val3\' | \'val4\';\n' +S 'export type enum2 = \'val5\' | \'val6\' | \'val7\' | \'val8\';\n') }) })* describe('generateTableTypes', () => {3 it('empty table definition object', () => {U const tableTypes = Typescript.generateTableTypes('tableName',{}, options)$ assert.equal(tableTypes, '\n' +> ' export namespace tableNameFields {' + '\n ' + '\n ' + '}' + '\n ') }), it('with table definitions', () => {K const tableTypes = Typescript.generateTableTypes('tableName', {L col1: {udtName: 'name1', nullable: false, tsType: 'string'},K col2: {udtName: 'name2', nullable: false, tsType: 'number'} }, options)$ assert.equal(tableTypes, '\n' +> ' export namespace tableNameFields {' +8 '\n export type col1 = string;' +0 '\nexport type col2 = number;' + '\n' + '\n }' + '\n ') })6 it('with nullable column definitions', () => {K const tableTypes = Typescript.generateTableTypes('tableName', {K col1: {udtName: 'name1', nullable: true, tsType: 'string'},J col2: {udtName: 'name2', nullable: true, tsType: 'number'} }, options)$ assert.equal(tableTypes, '\n' +> ' export namespace tableNameFields {' +> '\n export type col1 = string| null;' +6 '\nexport type col2 = number| null;' + '\n' + '\n }' + '\n ') }) })})5�_Ð ÿÿÿÿ^ |'õ €( assert.equal(tableInterface,5�_Ðÿÿÿÿ^ |+õ€( assert.equal(tableInterface,5�_Ð ÿÿÿÿ^ |+õ!€( assert.equal(tableInterface,5�_Ð/ÿÿÿÿ^ |1õ.0€( assert.equal(tableInterface,5�_Ð=ÿÿÿÿ^ |3õ<>€% assert.equal(enumType,'')5�_ÐDÿÿÿÿ^ |4õCE€" assert.equal(enumType,5�_Ð Lÿÿÿÿ^ |4õKM€% assert.equal(enumType,'')5�_Ð [ÿÿÿÿ^ |4õZ\€$ assert.equal(tableTypes,5�_Ð hÿÿÿÿ^ |9õgi€$ assert.equal(tableTypes,5�_Ð vÿÿÿÿ^ |:õuw€$ assert.equal(tableTypes,5�_Ð Sÿÿÿÿ^ |:õRT€" assert.equal(enumType,5�çª