Skip to content

[BUG] test/lib/publish.js fails if not ran from a git repo #3842

Closed
@wraithgar

Description

@wraithgar

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

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.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

  • Node: 16.11.0 release candidate
  • npm: 7.24.2

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions