mirror of
https://github.com/laurent22/joplin.git
synced 2026-06-18 20:16:34 +02:00
Clipper: Refactored image rules to re-use more code
This commit is contained in:
@@ -30,4 +30,19 @@ describe('htmlUtils', function() {
|
||||
done();
|
||||
});
|
||||
|
||||
it('should encode attributes', async (done) => {
|
||||
const testCases = [
|
||||
[{ a: 'one', b: 'two' }, 'a="one" b="two"'],
|
||||
[{ a: 'one&two' }, 'a="one&two"'],
|
||||
];
|
||||
|
||||
for (let i = 0; i < testCases.length; i++) {
|
||||
const attrs = testCases[i][0];
|
||||
const expected = testCases[i][1];
|
||||
expect(htmlUtils.attributesHtml(attrs)).toBe(expected);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user