cartodb-4.42/lib/assets/test/spec/builder/helpers/locale.spec.js
2024-04-06 05:25:13 +00:00

19 lines
646 B
JavaScript

var localeHelper = require('builder/helpers/locale');
describe('helpers/locale', function () {
var data = {
body: "You are over platform's limits. Please %{link} to know more details",
link: 'contact us',
href: 'mailto:support@carto.com'
};
it('should resolve properly', function () {
expect(localeHelper.resolve('notifications.sql.429')).toEqual(data);
expect(localeHelper.resolve('notifications.sql.429.link')).toEqual(data.link);
});
it('should linkify properly', function () {
expect(localeHelper.linkify('notifications.sql.429')).toContain("<a href='mailto:support@carto.com'>contact us</a>");
});
});