From bd19b0e2575f5b9bc59760a6aff28affa14bbc23 Mon Sep 17 00:00:00 2001 From: sanketshevkar Date: Thu, 16 Jan 2025 23:30:32 +0530 Subject: [PATCH] fix(aliasing): new test Signed-off-by: sanketshevkar --- packages/concerto-core/test/introspect/decorator.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/concerto-core/test/introspect/decorator.js b/packages/concerto-core/test/introspect/decorator.js index f4b7bd032..2ab711c3e 100644 --- a/packages/concerto-core/test/introspect/decorator.js +++ b/packages/concerto-core/test/introspect/decorator.js @@ -106,10 +106,16 @@ describe('Decorator - Test for Decorator arguments using Import Aliasing', () => describe('#validate', () => { - it('should be able get validate a decorator whose argument is an imported type which is aliased', () => { + it('should be able get validate a decorator on a classDeclaration whose argument is an imported type which is aliased', () => { const classDeclaration = resolvedModelManager.getType('parent@1.0.0.Child'); const decorator = classDeclaration.getDecorators()[0]; expect(decorator.validate.bind(decorator)).to.not.throw(); }); + + it('should be able get validate a decorator on a namespace whose argument is an imported type which is aliased', () => { + const classDeclaration = resolvedModelManager.getModelFile('parent@1.0.0'); + const decorator = classDeclaration.getDecorators()[0]; + expect(decorator.validate.bind(decorator)).to.not.throw(); + }); }); });