Skip to content

Commit

Permalink
test: coverage for trait changeProp not set (#6101)
Browse files Browse the repository at this point in the history
Co-authored-by: Artur Arseniev <artur.catch@hotmail.it>
  • Loading branch information
danstarns and artf authored Sep 2, 2024
1 parent c22abc6 commit 9d90e00
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/specs/data_sources/model/TraitDataVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
});

0 comments on commit 9d90e00

Please sign in to comment.