javascript-time-ago
Version:
Localized relative date/time formatting
33 lines • 842 B
JavaScript
import { describe, it } from 'mocha';
import { expect } from 'chai';
import renameLegacyProperties from './renameLegacyProperties.js';
describe('style/renameLegacyProperties', function () {
it('should rename legacy properties', function () {
expect(renameLegacyProperties({
steps: [{
unit: 'now',
minTime: {
week: 2,
"default": 1
}
}],
labels: 'long'
})).to.deep.equal({
gradation: [{
unit: 'now',
threshold: 1,
threshold_for_week: 2
}],
flavour: 'long'
});
});
it('should cover edge cases', function () {
var custom = function custom() {};
expect(renameLegacyProperties({
custom: custom
})).to.deep.equal({
custom: custom
});
});
});
//# sourceMappingURL=renameLegacyProperties.test.js.map