From f2b9cd1d7aa81e91a7f9646c21971ab6dd0145ad Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 30 Jun 2021 02:23:08 -0400 Subject: [PATCH] Update format_number time test for APJ timezones (#102691) (#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 --- x-pack/plugins/monitoring/public/lib/format_number.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/public/lib/format_number.test.js b/x-pack/plugins/monitoring/public/lib/format_number.test.js index 551ec1e6a4096..b93f9101a4df2 100644 --- a/x-pack/plugins/monitoring/public/lib/format_number.test.js +++ b/x-pack/plugins/monitoring/public/lib/format_number.test.js @@ -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', () => {