Skip to content

Commit

Permalink
test: ut coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nliu-ms committed Apr 24, 2023
1 parent f343b91 commit 2b711a9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/cli/tests/unit/cmds/update.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,19 @@ describe("Update Teams app manifest Command Tests", function () {
expect(e.message).equals("Fake_Err_msg");
}
});

it("Update Teams app - Run command failed without env", async () => {
sandbox.stub(FxCore.prototype, "deployTeamsManifest").resolves(ok(""));
const cmd = new Update();
const updateTeamsAppManifest = cmd.subCommands.find((cmd) => cmd.commandHead === "teams-app");
const args = {
folder: "fake_test",
"manifest-file-path": "./appPackage/manifest.json",
};
const res = await updateTeamsAppManifest!.runCommand(args);
expect(res.isErr()).to.be.true;
if (res.isErr()) {
expect(res.error.message).equal("The --env argument is not specified");
}
});
});

0 comments on commit 2b711a9

Please sign in to comment.