Reference exported names via import *.
Rather than via properties on default exports — see https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
This commit is contained in:
parent
060eb52d32
commit
93c9da2c2e
21 changed files with 52 additions and 55 deletions
8
lib/actions-util.test.js
generated
8
lib/actions-util.test.js
generated
|
|
@ -26,7 +26,7 @@ const fs = __importStar(require("fs"));
|
|||
const path = __importStar(require("path"));
|
||||
const ava_1 = __importDefault(require("ava"));
|
||||
const yaml = __importStar(require("js-yaml"));
|
||||
const sinon_1 = __importDefault(require("sinon"));
|
||||
const sinon = __importStar(require("sinon"));
|
||||
const actionsutil = __importStar(require("./actions-util"));
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const util_1 = require("./util");
|
||||
|
|
@ -43,7 +43,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_SHA still checked out", a
|
|||
const currentSha = "a".repeat(40);
|
||||
process.env["GITHUB_REF"] = expectedRef;
|
||||
process.env["GITHUB_SHA"] = currentSha;
|
||||
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
|
||||
const callback = sinon.stub(actionsutil, "getCommitOid");
|
||||
callback.withArgs("HEAD").resolves(currentSha);
|
||||
const actualRef = await actionsutil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
|
|
@ -54,7 +54,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_REF still checked out but
|
|||
process.env["GITHUB_REF"] = expectedRef;
|
||||
process.env["GITHUB_SHA"] = "b".repeat(40);
|
||||
const sha = "a".repeat(40);
|
||||
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
|
||||
const callback = sinon.stub(actionsutil, "getCommitOid");
|
||||
callback.withArgs("refs/remotes/pull/1/merge").resolves(sha);
|
||||
callback.withArgs("HEAD").resolves(sha);
|
||||
const actualRef = await actionsutil.getRef();
|
||||
|
|
@ -64,7 +64,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_REF still checked out but
|
|||
ava_1.default("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => {
|
||||
process.env["GITHUB_REF"] = "refs/pull/1/merge";
|
||||
process.env["GITHUB_SHA"] = "a".repeat(40);
|
||||
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
|
||||
const callback = sinon.stub(actionsutil, "getCommitOid");
|
||||
callback.withArgs("refs/pull/1/merge").resolves("a".repeat(40));
|
||||
callback.withArgs("HEAD").resolves("b".repeat(40));
|
||||
const actualRef = await actionsutil.getRef();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue