karma CI job fails in env between UTC-7 and UTC-12 or between UTC+6 and UTC+12
Summary
karma
CI job fails in the environment with timezone between UTC-7 and UTC-12 or between UTC+6 and UTC+14 (in other words, which is successful only with timezone between UTC-6 and UTC+5).
Steps to reproduce
Execute bundle exec rake karma
in the environment with timezone between UTC+6 and UTC+14.
Relevant logs and/or screenshots
At master
(ba02e3a5) with timezone UTC+9, bundle exec rake karma
outputs an error as follows:
Chrome GraphFlag Computed props formatTime FAILED
Expected '3:17AM' to match /\d:17PM/.
at Object.<anonymous> (webpack:///tmp/gitlab-ce/spec/javascripts/monitoring/graph/flag_spec.js:97:0 <- spec/javascripts/test_bundle.js:233275:36)
Chrome GraphFlag Computed props formatDate FAILED
Expected 'Mon, Jun 5' to equal 'Sun, Jun 4'.
at Object.<anonymous> (webpack:///tmp/gitlab-ce/spec/javascripts/monitoring/graph/flag_spec.js:101:0 <- spec/javascripts/test_bundle.js:233279:36)
Chrome: Executed 3435 of 3435 (2 FAILED) (1 min 12.209 secs / 1 min 11.219 secs)
error Command failed with exit code 1.
Possible fixes
Use a timezone-aware testing framework, or just spec/javascripts/monitoring/graph/flag_spec.js
should be fixed.