UNPKG

javascript-time-ago

Version:
37 lines (33 loc) 930 B
"use strict"; var _renameLegacyProperties = _interopRequireDefault(require("./renameLegacyProperties")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } describe('style/renameLegacyProperties', function () { it('should rename legacy properties', function () { (0, _renameLegacyProperties.default)({ steps: [{ unit: 'now', minTime: { week: 2, default: 1 } }], labels: 'long' }).should.deep.equal({ gradation: [{ unit: 'now', threshold: 1, threshold_for_week: 2 }], flavour: 'long' }); }); it('should cover edge cases', function () { var custom = function custom() {}; (0, _renameLegacyProperties.default)({ custom: custom }).should.deep.equal({ custom: custom }); }); }); //# sourceMappingURL=renameLegacyProperties.test.js.map