Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff84c6f

Browse files
committed
Improve comment
1 parent948c7fb commitff84c6f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/git-utils.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import*asfsfrom"fs";
2+
import*asosfrom"os";
23
import*aspathfrom"path";
34

45
import*ascorefrom"@actions/core";
@@ -376,7 +377,9 @@ test("getFileOidsUnderPath throws on unexpected output format", async (t) => {
376377
});
377378

378379
test("getGitVersionOrThrow returns version for valid git output",async(t)=>{
379-
sinon.stub(gitUtilsasany,"runGitCommand").resolves("git version 2.40.0");
380+
sinon
381+
.stub(gitUtilsasany,"runGitCommand")
382+
.resolves(`git version 2.40.0${os.EOL}`);
380383

381384
constversion=awaitgitUtils.getGitVersionOrThrow();
382385
t.is(version.truncatedVersion,"2.40.0");
@@ -403,7 +406,7 @@ test("getGitVersionOrThrow handles Windows-style git output", async (t) => {
403406
.resolves("git version 2.40.0.windows.1");
404407

405408
constversion=awaitgitUtils.getGitVersionOrThrow();
406-
//Should extract just the major.minor.patch portion
409+
//The truncated version should contain just the major.minor.patch portion
407410
t.is(version.truncatedVersion,"2.40.0");
408411
t.is(version.fullVersion,"2.40.0.windows.1");
409412
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp