Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relative_options converted to TS #1921

Merged
merged 4 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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