Skip to content

Commit

Permalink
Add tests for important in style properties
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jun 7, 2018
1 parent 15b1fa5 commit a7408fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/specs/style_manager/model/Models.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ module.exports = {
expect(obj.parseValue('fn(testValue)')).toEqual(result);
expect(obj.parseValue('fn(testValue')).toEqual(result);
});

test('Parse correctly a value with !important', () => {
const result = { value: 'red', important: 1 };
expect(obj.parseValue('red !important ')).toEqual(result);
});

test('getFullValue', () => {
obj = new Property({ functionName: 'fn', value: 'red' });
expect(obj.getFullValue()).toEqual('fn(red)');
obj = new Property({ functionName: 'fn', value: '#123', important: 1 });
expect(obj.getFullValue()).toEqual('fn(#123) !important');
});
});

describe('PropertyInteger', () => {
Expand Down

0 comments on commit a7408fb

Please sign in to comment.