question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 14 support

See original GitHub issue

Description

Currently standalone components, directives and pipes cannot be tested because they are automatically added to the declarations portion when configuring TestBed internally. Angular throws an error when trying to declare a standalone component.

Proposed solution

Add the component/directive/pipe-under-test to the imports section of TestBed.configureTestingModule if the component is standalone.

Alternatives considered

There isn’t really a way to work around this.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Jun 9, 2022

🎉 This issue has been resolved in version 12.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
jadengiscommented, Jun 8, 2022

I opened a PR which upgrades to v14 and fixes the render api to add standalone components to imports instead of declarations. With this change await render(StandaloneComponent) works. Let me know what you think. 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular versioning and releases
Actively supported versionslink. The following table provides the status for Angular versions under support. Version, Status, Released, Active ends, LTS ends ...
Read more >
Angular - endoflife.date
Release Released Active Support 15 1 month and 1 week ago. (16 Nov 2022) Ends in 4 months and 3 weeks. (18 M... 14 (...
Read more >
Announcing Angular 14 with New Updates and Features
Read on what's new in Angular 14 with its new features, updates and installation ... It also supports the latest TypeScript 4.7 release....
Read more >
Releases · angular/angular - GitHub
15.1.0-next.3 (2022-12-14). animations ... fix - f8ecc194e9, Update Location to support base href containing origin (#48327) ...
Read more >
The Fullest Overview on Angular 14 Features - ModLogix
The recently released Angular 14 supports TypeScript 4.7, also targeting ES2020 by default. In addition, the CLI can deploy small code without ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found