diff --git a/test/specs/data_sources/model/TraitDataVariable.ts b/test/specs/data_sources/model/TraitDataVariable.ts index e968a3f5ba..0b7611cb45 100644 --- a/test/specs/data_sources/model/TraitDataVariable.ts +++ b/test/specs/data_sources/model/TraitDataVariable.ts @@ -342,5 +342,23 @@ describe('TraitDataVariable', () => { property = cmp.get('test-change-prop'); expect(property).toBe('I really love grapes'); }); + + test('should cover when changeProp trait value is not set', () => { + const cmp = cmpRoot.append({ + tagName: 'div', + type: 'default', + 'test-change-prop': 'initial-value', + traits: [ + { + name: 'test-change-prop', + type: 'text', + changeProp: true, + }, + ], + })[0]; + + let property = cmp.get('test-change-prop'); + expect(property).toBe('initial-value'); + }); }); });