Skip to content

Commit

Permalink
test: add a test for status being an array
Browse files Browse the repository at this point in the history
  • Loading branch information
domharrington committed Jul 16, 2024
1 parent 0f5a312 commit a33b237
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ function createCommandArguments<
type GitlogError = ExecFileException | null;

type CommitBase<Field extends string> = Record<Field, string>;
type CommitBaseWithFiles<Field extends string> = CommitBase<Field> & Record<NotOptField, string[]>;
type CommitBaseWithFiles<Field extends string> = CommitBase<Field> &
Record<NotOptField, string[]>;

function gitlog<Field extends CommitField = DefaultField>(
userOptions: GitlogOptions<Field> & { nameStatus: false },
Expand Down
2 changes: 1 addition & 1 deletion test/gitlog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit a33b237

Please sign in to comment.