From a33b237079883887124063d0a9c6c8fe685f5d61 Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Tue, 16 Jul 2024 12:52:45 +0100 Subject: [PATCH] test: add a test for status being an array --- src/index.ts | 3 ++- test/gitlog.test.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2c9eb8c..5db5630 100644 --- a/src/index.ts +++ b/src/index.ts @@ -309,7 +309,8 @@ function createCommandArguments< type GitlogError = ExecFileException | null; type CommitBase = Record; -type CommitBaseWithFiles = CommitBase & Record; +type CommitBaseWithFiles = CommitBase & + Record; function gitlog( userOptions: GitlogOptions & { nameStatus: false }, diff --git a/test/gitlog.test.ts b/test/gitlog.test.ts index 677cc56..e89d19a 100644 --- a/test/gitlog.test.ts +++ b/test/gitlog.test.ts @@ -260,7 +260,7 @@ describe("gitlog", () => { expect(commits[0].subject).toBeDefined(); expect(commits[0].authorName).toBeDefined(); expect(commits[0].hash).toBeDefined(); - expect(commits[0].status).toBeDefined(); + expect(commits[0].status).toBeInstanceOf(Array); expect(commits[0].files).toBeDefined(); });