From 85bcae563eee327f2557063f7d752461fe3fe8f9 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 6 Oct 2023 14:15:36 +0200 Subject: [PATCH] fix and test --- src/models/v3/channel-parameter.ts | 6 +++++- test/models/v3/channel-parameter.spec.ts | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/models/v3/channel-parameter.ts b/src/models/v3/channel-parameter.ts index 54099a351..1e27d17d3 100644 --- a/src/models/v3/channel-parameter.ts +++ b/src/models/v3/channel-parameter.ts @@ -22,7 +22,11 @@ export class ChannelParameter extends BaseModel({ description: 'test' }); + const d = new ChannelParameter(doc); + expect(d.schema()).toBeInstanceOf(Schema); + expect(d.schema()?.description()).toEqual('test'); + }); + it('should return empty schema with type string when there is no value', function() { const doc = serializeInput({}); const d = new ChannelParameter(doc); - expect(d.schema()).toBeUndefined(); + expect(d.schema()).toBeInstanceOf(Schema); + expect(d.schema()?.type()).toEqual('string'); }); });