• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moment / moment / 4820 / 2
89%
master: 88%

Build:
Build:
LAST BUILD BRANCH: wip/weird-weeks
DEFAULT BRANCH: master
Ran 25 Apr 2020 08:43PM UTC
Files 321
Run time 18s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Apr 2020 08:41PM UTC coverage: 88.386% (-0.01%) from 88.4%
SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure]

push

travis-ci

web-flow
[bugfix] Properly fallback to base locales in array getter (#5459)

It looks like the existing implementation of this feature was pretty
well thought out and correct, the problem was that a compareArray
function was used which was comparing arrays in a rather bizzare
fashion that was not in line with what a "normal person" would expect.
So now the array comparator is correct, and the logic works properly.

The logic works as follows -- the next locale is picked and tried as-is.
If that fails, the code normally tries to chop the last bit (normally
the country designation) and try again. However, if the next array
element has the same or longer prefix as the one to be tried, the
iteration continues. So for example if the array has the sequence

    "AA-BB", "AA-CC", "XX-YY"

then first "AA-BB" is tried, then a naive solution would try "AA", but
this one instead checks to see that "AA-CC" is actually more concrete
than "AA", so it tries "AA-CC" next, and only after it fails (if it
fails) it tries "AA", because "XX-YY" does not have "AA" as prefix. So
in the end the following locales are tried in this order (assuming all
fail so the next one is tried):

    "AA-BB", "AA-CC", "AA", "XX-YY", "XX"

Fixes #4780

7387 of 14519 branches covered (50.88%)

45205 of 51145 relevant lines covered (88.39%)

2250.64 hits per line

Source Files on job 4820.2 (SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure])
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 4361
  • Travis Job 4820.2
  • 4dfb749e on github
  • Prev Job for SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure] on develop (#4817.2)
  • Next Job for SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure] on develop (#4821.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc