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'); }); });