Update test to check base ref/sha values

This commit is contained in:
Robin Neatherway 2021-01-13 11:57:55 +00:00
parent 087e7a3a1a
commit a7f3c648eb
3 changed files with 5 additions and 5 deletions

View file

@ -47,8 +47,8 @@ ava_1.default("validate correct payload used per version", async (t) => {
process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`;
for (const version of newVersions) {
const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions");
t.truthy(payload.base_ref);
t.truthy(payload.base_sha);
t.deepEqual(payload.base_ref, "master");
t.deepEqual(payload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");
}
for (const version of oldVersions) {
const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions");