mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
22 lines
698 B
JavaScript
22 lines
698 B
JavaScript
import * as utils from '../../../src/components/utils/utils';
|
|
|
|
|
|
describe('Utils Component', () => {
|
|
it('is available', () => {
|
|
expect(utils).not.to.be.null;
|
|
});
|
|
describe('escapeHtml method', () => {
|
|
it('is available', () => {
|
|
expect(utils.escapeHtml).not.to.be.null;
|
|
});
|
|
it('transform a simple phrase', () => {
|
|
const simplePhrase = 'hello world';
|
|
expect(utils.escapeHtml(simplePhrase)).to.eql(simplePhrase)
|
|
});
|
|
it('transform html entities', () => {
|
|
const simplePhrase = 'hello & world';
|
|
expect(utils.escapeHtml(simplePhrase)).to.eql('hello & world')
|
|
});
|
|
});
|
|
});
|