Skip to content

Commit

Permalink
tests(i18n): update canonical locale test for node 12.6 (#9396)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Jul 18, 2019
1 parent e3efee0 commit 474c22e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branches:
matrix:
include:
- node_js: "10"
- node_js: "11"
- node_js: "12"
if: head_branch IS blank AND branch = master
dist: trusty
cache:
Expand Down
3 changes: 2 additions & 1 deletion lighthouse-core/test/lib/i18n/locales-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ describe('locales', () => {
const deprecatedCodes = {
in: 'id',
iw: 'he',
mo: 'ro',
};

for (const locale of Object.keys(locales)) {
const canonicalLocale = Intl.getCanonicalLocales(locale)[0];
const substitute = deprecatedCodes[locale];
assert.ok(locale === canonicalLocale || substitute === canonicalLocale,
`locale code '${locale}' not canonical`);
`locale code '${locale}' not canonical ('${canonicalLocale}' found instead)`);
}

// Deprecation subsitutes should be removed from the test if no longer used.
Expand Down

0 comments on commit 474c22e

Please sign in to comment.