aboutsummaryrefslogtreecommitdiff
path: root/test/util.ts
blob: 50611d601eb4945a311e821da6f2363886d9a064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Commit } from "server/src/git/commit";

export type EnvironmentVariables = {
	BASE_DIR: string,
	AVAIL_REPO: string,
	UNAVAIL_REPO: string,
	AVAIL_OBJECT: string,
	UNAVAIL_OBJECT: string,
	AVAIL_COMMIT: string,
	UNAVAIL_COMMIT: string
}

export function expectCommitProperties(commit: Commit) {
	expect(commit).toHaveProperty("id");
	expect(commit).toHaveProperty("author");
	expect(commit).toHaveProperty("author.name");
	expect(commit).toHaveProperty("author.email");
	expect(commit).toHaveProperty("date");
	expect(commit).toHaveProperty("message");
}