Skip to content

Commit

Permalink
Fix test to be immune to running on Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Neatherway committed Nov 30, 2020
1 parent 836cbe0 commit d99e994
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/upload-lib.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.test.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/upload-lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit d99e994

Please sign in to comment.