New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT Unit Tests: Need overrideTemplate support in AOT mode #19815

Closed
vikerman opened this Issue Oct 20, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@vikerman
Contributor

vikerman commented Oct 20, 2017

In order to help developers switch to AOT during unit testing we need to make it easier to mock child components.

The way decided would be to have a TestBed.overrideTemplate(Component, newTemplate) function that would JIT compile a new template for an existing AOT-ed component.

@tbosch tbosch added this to Prio_col1 in Compiler Oct 20, 2017

@tbosch tbosch removed their assignment Oct 26, 2017

tbosch added a commit to tbosch/angular that referenced this issue Oct 28, 2017

feat(compiler): introduce `TestBed.overrideTemplateUsingTestingModule`
This allows to overwrite templates for JIT and AOT components alike.

In contrast to `TestBed.overrideTemplate`, the template is compiled
in the context of the testing module, allowing to use other testing
directives.

Closes #19815

@tbosch tbosch self-assigned this Oct 28, 2017

tbosch added a commit to tbosch/angular that referenced this issue Oct 30, 2017

feat(compiler): introduce `TestBed.overrideTemplateUsingTestingModule`
This allows to overwrite templates for JIT and AOT components alike.

In contrast to `TestBed.overrideTemplate`, the template is compiled
in the context of the testing module, allowing to use other testing
directives.

Closes #19815

@tbosch tbosch assigned vicb and unassigned tbosch Nov 1, 2017

@tbosch

This comment has been minimized.

Show comment
Hide comment
@tbosch

tbosch Nov 1, 2017

Member

See my PR #19996 which @vicb is taking over.

Member

tbosch commented Nov 1, 2017

See my PR #19996 which @vicb is taking over.

vicb added a commit to vicb/angular that referenced this issue Nov 6, 2017

feat(compiler): introduce `TestBed.overrideTemplateUsingTestingModule`
This allows to overwrite templates for JIT and AOT components alike.

In contrast to `TestBed.overrideTemplate`, the template is compiled
in the context of the testing module, allowing to use other testing
directives.

Closes #19815

vicb added a commit to vicb/angular that referenced this issue Nov 6, 2017

feat(compiler): introduce `TestBed.overrideTemplateUsingTestingModule`
This allows to overwrite templates for JIT and AOT components alike.

In contrast to `TestBed.overrideTemplate`, the template is compiled
in the context of the testing module, allowing to use other testing
directives.

Closes #19815

@vicb vicb closed this in a460066 Nov 6, 2017

@chuckjaz chuckjaz removed this from Prio_col1 in Compiler Nov 8, 2017

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Nov 17, 2017

Member

this was fixed by #20224

Member

IgorMinar commented Nov 17, 2017

this was fixed by #20224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment