mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-11 22:13:20 +03:00
6d3a629690
- This mini helper wraps lodash template and supports `{...}` as the delimiters - It's designed to use and support the exact same patterns we already have in our en.json strings E.g. The {flagName} flag must be enabled in labs if you wish to use the \\{\\{{helperName}\\}\\} helper. - This allows us to get rid of our old, broken i18n helper and still keep some of the smart messaging we have setup - It also keeps the refactor surface area minimal
13 lines
363 B
JavaScript
13 lines
363 B
JavaScript
// Switch these lines once there are useful utils
|
|
// const testUtils = require('./utils');
|
|
require('./utils');
|
|
|
|
describe('Lodash Template', function () {
|
|
it('Does not get clobbered by this lib', function () {
|
|
require('../lib/tpl');
|
|
let _ = require('lodash');
|
|
|
|
_.templateSettings.interpolate.should.eql(/<%=([\s\S]+?)%>/g);
|
|
});
|
|
});
|