Skip to content

Commit

Permalink
relative_options converted to TS (#1921)
Browse files Browse the repository at this point in the history
* `relative_options` converted to TS

* `relactive_options` Code Review

* `relactive_options` Changelog
  • Loading branch information
theodesp authored and chandlerprall committed May 9, 2019
1 parent debab6b commit 9e3641c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Converted `relative_options` to TS ([#1921](https://github.com/elastic/eui/pull/1921))

**Bug fixes**

- Removed unused prop enum of `l` in `EuiButton` ([#1936](https://github.com/elastic/eui/pull/1936))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { relativeUnitsFromLargestToSmallest } from './relative_options';

describe('relativeUnitsFromLargestToSmallest', () => {
test('relativeUnitsFromLargestToSmallest length', () => {
expect(relativeUnitsFromLargestToSmallest.length).toBe(7);
});
test('relativeUnitsFromLargestToSmallest order', () => {
expect(relativeUnitsFromLargestToSmallest).toEqual([
'y',
'M',
'w',
'd',
'h',
'm',
's',
]);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export const relativeOptions = [
{ text: 'Seconds ago', value: 's' },
{ text: 'Minutes ago', value: 'm' },
Expand Down

0 comments on commit 9e3641c

Please sign in to comment.