Skip to content

Commit

Permalink
Update format_number time test for APJ timezones (elastic#102691) (el…
Browse files Browse the repository at this point in the history
…astic#103828)

* Update format_number test for APJ timezones

* Switch asertion to optional leading 1

* Allow leading 1 or 2

In EMEA timezones H:mm:ss can return 20:42:17

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Mat Schaffer <mat@elastic.co>
  • Loading branch information
kibanamachine and matschaffer authored Jun 30, 2021
1 parent f288e7a commit f2b9cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/monitoring/public/lib/format_number.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('format_number', () => {
});

it('should format time in H:mm:ss', () => {
expect(formatNumber(1461868937000, 'time')).to.match(/\d\d:\d\d:\d\d/);
expect(formatNumber(1461868937000, 'time')).to.match(/[12]?\d:\d\d:\d\d/);
});

it('should format integers with commas', () => {
Expand Down

0 comments on commit f2b9cd1

Please sign in to comment.