Skip to content

Commit

Permalink
fix(upgrade): Logging a message that licensed package is already inst…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
dafo authored Jun 3, 2020
1 parent 3ab63f9 commit 63df30d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/igx-templates/Update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ describe("updateWorkspace - Unit tests", () => {
});
it("Should fail if current used package is registry package", async () => {
spyOn(pkgResolve, "getUpgradeablePackages").and.returnValue([]);
spyOn(Util, "log");
expect(await updateWorkspace("")).toEqual(false);
expect(Util.log).toHaveBeenCalledWith("Your app is already using packages from the Infragistics registry. You are good to go.", "green");
});

it("Should fail if no packages.json is found", async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/igx-templates/Update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function updateWorkspace(rootPath: string): Promise<boolean> {
const fs: IFileSystem = App.container.get(FS_TOKEN);
const upgradeable = getUpgradeablePackages();
if (!upgradeable.length) {
// log "no change needed"
Util.log("Your app is already using packages from the Infragistics registry. You are good to go.", "green");
return false;
}

Expand Down

0 comments on commit 63df30d

Please sign in to comment.