You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] test/lib/publish.js fails if not ran from a git repo #3842
https://github.com/nodejs/node/pull/40319 cigtm failed cause of a quirk in the way our tests work. Because the snapshots are inside the cli repo itself, when we normally run them there is a gitHead. nodejs tests run the code in a state where there is no .git folder to find, so that attribute is missing and the tests fail.
These tests should be robust enough to handle either case, either deleting the attribute itself or hard setting it without the if statement.
It's also possible to configure CITGM to use a git checkout for npm (the feature exists already)
That would get your citgm unblocked but this really should be a test that is robust enough to work in this case. The publish tests aren't the place where we are even checking if the gitHead is set properly when reading a package, they should be discarded imo.
npm8 is the only thing going out this week but I'll get a pr ready and this should be remediated by next week's npm release.
Activity
targos commentedon Oct 6, 2021
It's also possible to configure CITGM to use a git checkout for npm (the feature exists already)
wraithgar commentedon Oct 6, 2021
That would get your citgm unblocked but this really should be a test that is robust enough to work in this case. The publish tests aren't the place where we are even checking if the
gitHeadis set properly when reading a package, they should be discarded imo.npm8 is the only thing going out this week but I'll get a pr ready and this should be remediated by next week's npm release.
ruyadorno commentedon Jan 25, 2022
it looks like this was fixed, thanks @wraithgar 😊