forked from kpdecker/jsdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss.js
More file actions
18 lines (16 loc) · 739 Bytes
/
Copy pathcss.js
File metadata and controls
18 lines (16 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import {diffCss} from '../../lib/diff/css';
import {convertChangesToXML} from '../../lib/convert/xml';
import {expect} from 'chai';
describe('diff/css', function() {
describe('#diffCss', function() {
it('should diff css', function() {
const diffResult = diffCss(
'.test,#value .test{margin-left:50px;margin-right:-40px}',
'.test2, #value2 .test {\nmargin-top:50px;\nmargin-right:-400px;\n}');
expect(convertChangesToXML(diffResult)).to.equal(
'<del>.test</del><ins>.test2</ins>,<del>#value</del> <ins>#value2 </ins>.test<ins> </ins>{'
+ '<del>margin-left</del><ins>\nmargin-top</ins>:50px;<ins>\n</ins>'
+ 'margin-right:<del>-40px</del><ins>-400px;\n</ins>}');
});
});
});