aboutsummaryrefslogtreecommitdiff
path: root/test/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/util.ts')
-rw-r--r--test/util.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/util.ts b/test/util.ts
new file mode 100644
index 0000000..50611d6
--- /dev/null
+++ b/test/util.ts
@@ -0,0 +1,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");
+} \ No newline at end of file