Make sure env is reset between tests
This commit is contained in:
parent
ccee4c68ff
commit
b7028afcb4
3 changed files with 3 additions and 1 deletions
1
lib/actions-util.test.js
generated
1
lib/actions-util.test.js
generated
|
|
@ -100,6 +100,7 @@ const util_1 = require("./util");
|
|||
const expectedRef = "refs/pull/1/HEAD";
|
||||
const currentSha = "a".repeat(40);
|
||||
process.env["CODE_SCANNING_REF"] = expectedRef;
|
||||
process.env["GITHUB_REF"] = "";
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
const actualRef = await actionsutil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -94,6 +94,7 @@ test("getRef() returns CODE_SCANNING_REF as a fallback for GITHUB_REF", async (t
|
|||
const expectedRef = "refs/pull/1/HEAD";
|
||||
const currentSha = "a".repeat(40);
|
||||
process.env["CODE_SCANNING_REF"] = expectedRef;
|
||||
process.env["GITHUB_REF"] = "";
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
|
||||
const actualRef = await actionsutil.getRef();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue