question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors when running tests locally

See original GitHub issue

Hey I’d like to get Lighthouse tests passing locally so I can make changes and be confident I’ve not broken anything, but getting a few errors whereas the Travis build seems to be passing. Wondering if I’m missing something?

yarn && yarn build-all ✅️

yarn bundlesize ✅️ yarn diff:sample-json ✅️ yarn lint ✅️

yarn unit ❗️
yarn type-check ✅️⚠️ FYI originally failed with this. But after clearing node modules it started passing.

yarn smoke ✅️

yarn test-clients ❗️

yarn test-viewer ✅️ yarn test-lantern ✅️ yarn test-legacy-javascript ✅️ yarn test-bundle ✅️ yarn i18n:checks✅️ yarn dogfood-lhci✅️

yarn test-docs ✅️⚠️

Update: brew install jq fixed this

Environment Information

  • Yarn: 1.22.4
  • Node.js version: v13.12.0
  • Operating System: macOS Catalina

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
paulirishcommented, Apr 16, 2020

I’ve gotten errors on i18n items like that before.

yarn unit-core

That’s a toLocaleString() change that I’ve noticed locally with Node 13 as well, but I haven’t looked into what’s going on there. There’s been some big ICU changes with Node 13, which may be the root cause (if not helpful for finding a fix).

Ive been getting this one as well for several weeks. I, too, have node 13 installed.

…okay, did some testing…

image

i had thought it may be that 13 was using small-icu and we previously had full-icu… but i don’t think that anymore.

now it just seems that the CLDR data for thousands separator for spanish… CHANGED. note that Chrome also agrees with node 13: image

also… spotchecking a few other locales that do number formatting different from en… (like nl-BE, de-DE, hu-HU)… in node 12 they all show equivalent formatting to en, but not in node 13 (or in chrome).

huh.

image

so who knows why spanish was showing unique formatting in node 12 even if it says its an unsupported locale. WEIRD


this points to the Intl.js polyfill just being straight up wrong. it was last published 4 years ago, so that seems reasonable.

I tested out https://www.npmjs.com/package/@formatjs/intl-unified-numberformat briefly and it gives the correct results in ‘es’ for node 13 (after loading in the locale data).

tbh adopting that right now seems kinda dumb.

i think we may just want to disable this test until we retire support for node 12.

0reactions
brendankennycommented, Sep 29, 2020

I believe most of these have been fixed or are unfortunate flakes. We should fix the flakes, but sometimes it’s difficult to figure out a root cause (sometimes you really just need to rm -r node_modules/ && yarn).

Thanks for this issue @umaar! Feel free to file new lists of annoyances for us to fix 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local testing errors and troubleshooting | BrowserStack Docs
Learn how to resolve Local Testing connectivity and other issues while trying to test ... Ensure that the Local binary is running before...
Read more >
Why Do My Tests Pass Locally but Fail on CircleCI?
If your tests only pass when run in a certain order, they may fail on CircleCI. "Out of Memory" errors. If a process...
Read more >
Troubleshooting Continuous Integration, or How to Debug ...
So rebase your branch on master, and relaunch the tests locally - you may reproduce the CI error locally, and therefore fix it....
Read more >
Broken pipe errors when running tests locally in parallel
When running some of our functional tests against a local bedrock instance in parallel (multiple tests run at once), it seems tests that...
Read more >
Unit Test syntax errors still allow you to build on local
1 Answer 1 · The primary problem is that if unit tests have syntax errors, you can still build the project. The only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found