Fix test to be immune to running on Actions

This commit is contained in:
Robin Neatherway 2020-11-30 18:35:55 +00:00
parent 836cbe0784
commit d99e994194
5 changed files with 7 additions and 3 deletions

View file

@ -32,6 +32,7 @@ test("validate correct payload used per version", async (t) => {
];
const allVersions = newVersions.concat(oldVersions);
process.env["GITHUB_EVENT_NAME"] = "push";
for (const version of allVersions) {
const payload: any = uploadLib.buildPayload(
"commit",
@ -87,6 +88,7 @@ test("validate correct payload used per version", async (t) => {
version,
"actions"
);
// These older versions won't expect these values
t.falsy(payload.base_ref);
t.falsy(payload.base_sha);
}