Skip to content

Commit f8c65b7

Browse files
committed
Fix stub in tests.
1 parent 41dff7f commit f8c65b7

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

lib/api-client.test.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api-client.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api-client.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ const pkg = require("../package.json");
1111

1212
setupTests(test);
1313

14+
let pluginStub: sinon.SinonStub;
1415
let githubStub: sinon.SinonStub;
1516

1617
test.beforeEach(() => {
17-
githubStub = sinon.stub(githubUtils, "GitHub");
18+
pluginStub = sinon.stub(githubUtils.GitHub, "plugin");
19+
githubStub = sinon.stub();
20+
pluginStub.returns(githubStub);
1821
initializeEnvironment(Mode.actions, pkg.version);
1922
});
2023

0 commit comments

Comments
 (0)