UNPKG

javascript-time-ago

Version:

Localized relative date/time formatting

36 lines (35 loc) 1.06 kB
"use strict"; var _mocha = require("mocha"); var _chai = require("chai"); var _renameLegacyProperties = _interopRequireDefault(require("./renameLegacyProperties.js")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } (0, _mocha.describe)('style/renameLegacyProperties', function () { (0, _mocha.it)('should rename legacy properties', function () { (0, _chai.expect)((0, _renameLegacyProperties["default"])({ steps: [{ unit: 'now', minTime: { week: 2, "default": 1 } }], labels: 'long' })).to.deep.equal({ gradation: [{ unit: 'now', threshold: 1, threshold_for_week: 2 }], flavour: 'long' }); }); (0, _mocha.it)('should cover edge cases', function () { var custom = function custom() {}; (0, _chai.expect)((0, _renameLegacyProperties["default"])({ custom: custom })).to.deep.equal({ custom: custom }); }); }); //# sourceMappingURL=renameLegacyProperties.test.js.map