desktop / dugite

Elegant bindings for working with Git in your Node applications
MIT License
460 stars 149 forks source link

Avoid network ops in tests #564

Closed niik closed 3 months ago

niik commented 3 months ago

Based on #563 but broken out to be reviewed separately.

While working on #563 I noticed that we were doing actual clone's (or attempting to) of repositories hosted online. Several of these repositories are completely outside of the current team's control. This is both risky and unnecessary.

I've updated these tests to either a) not use clone at all when it doesn't have to, b) clone a local repository over the file:// protocol when the http protocol isn't required or c) clone using a fake Git server running locally.

I've also removed some tests that don't appear to be testing any dugite-specific functionality at all.