import { HostBillingSchema } from '@verb/src/libs/stream/host-metadata'; import { HostBillingMetadataResponseModel, HostBillingMetadataResponseSchema, } from '@verb/src/libs/stream/host-metadata/versioning/v1/host-billing-metadata-response.model'; describe('HostMetadataResponse', () => { describe('#toSchema', () => { it('should build a schema object from HostBillingSchema', () => { const hostBillingSchema: HostBillingSchema = { account_type: 'free', end_date: 'Tue, 03 Nov 2020 22:43:13 GMT', minutes: 100, payments: [], }; const hostBillingMetadataResponseSchema: HostBillingMetadataResponseSchema = { account_type: 'free', end_date: 'Tue, 03 Nov 2020 22:43:13 GMT', minutes: 100, }; const model = new HostBillingMetadataResponseModel(hostBillingSchema); const newSchema = model.toSchema(); expect(newSchema).toStrictEqual(hostBillingMetadataResponseSchema); }); }); });