Skip to content

refactor: remove leftover wrappers AngularTemplate and related tests#1556

Merged
damyanpetev merged 1 commit intomasterfrom
dpetev/angular-wrappers-leftovers
Mar 20, 2026
Merged

refactor: remove leftover wrappers AngularTemplate and related tests#1556
damyanpetev merged 1 commit intomasterfrom
dpetev/angular-wrappers-leftovers

Conversation

@damyanpetev
Copy link
Copy Markdown
Member

@damyanpetev damyanpetev commented Mar 19, 2026

Related to #1491

Additional information related to this pull request:

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 75.027% (-0.2%) from 75.25%
when pulling 4f5fb4b on dpetev/angular-wrappers-leftovers
into 8096fe0 on master.

@damyanpetev damyanpetev marked this pull request as ready for review March 19, 2026 17:03
Copilot AI review requested due to automatic review settings March 19, 2026 17:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated AngularTemplate wrapper implementation and its associated unit tests, consolidating Angular template behavior around IgniteUIForAngularTemplate from @igniteui/angular-templates.

Changes:

  • Deleted the legacy AngularTemplate class from the CLI package.
  • Removed the AngularTemplate base unit test suite.
  • Updated add command unit tests to stop referencing AngularTemplate and use IgniteUIForAngularTemplate instead.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
spec/unit/base-templates/AngularTemplate-spec.ts Removes unit tests targeting the deleted legacy AngularTemplate wrapper.
spec/unit/add-spec.ts Drops AngularTemplate usage in tests and switches a remaining instantiation to IgniteUIForAngularTemplate.
packages/cli/lib/templates/AngularTemplate.ts Removes the legacy Angular wrapper template implementation from the CLI package.
Comments suppressed due to low confidence (1)

spec/unit/add-spec.ts:379

  • This test calls addCmd.addTemplate(...), which returns a Promise, but the call isn’t awaited. Since the spec function is async, this can make the expectations run before addTemplate completes and can lead to flaky behavior (and potentially unhandled async failures). Await the call and consider asserting that registerInProject/processTemplates are not invoked when the module path is invalid, and that the returned value is false.
	it("Should not add component and should log error if wrong path is passed to module", async () => {
		spyOn(Util, "fileExists").and.returnValue(false);
		spyOn(Util, "error");
		const wrongPath = "myCustomModule/my-custom-module.module.ts";
		addCmd.addTemplate("test-file-name", new IgniteUIForAngularTemplate(__dirname), { modulePath: wrongPath });
		expect(Util.fileExists).toHaveBeenCalledTimes(1);
		expect(Util.error).toHaveBeenCalledTimes(1);
		expect(Util.error).toHaveBeenCalledWith(`Wrong module path provided: ${wrongPath}. No components were added!`);
	});

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@damyanpetev damyanpetev merged commit 0756d02 into master Mar 20, 2026
7 checks passed
@damyanpetev damyanpetev deleted the dpetev/angular-wrappers-leftovers branch March 20, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants