mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(migrations): add more tests to output migration (#57671)
This change contains an additonal test that captures scenario of the problematic .pipe usage outside of the directive class. PR Close #57671
This commit is contained in:
parent
c3e5b0a0b0
commit
f1bbbeab0c
1 changed files with 15 additions and 0 deletions
|
|
@ -174,6 +174,21 @@ describe('outputs', () => {
|
|||
`);
|
||||
});
|
||||
|
||||
it('should _not_ migrate outputs that are used with .pipe outside of a component class', () => {
|
||||
verifyNoChange(`
|
||||
import {Directive, Output, EventEmitter} from '@angular/core';
|
||||
|
||||
@Directive()
|
||||
export class TestDir {
|
||||
@Output() someChange = new EventEmitter();
|
||||
}
|
||||
|
||||
let instance: TestDir;
|
||||
|
||||
instance.someChange.pipe();
|
||||
`);
|
||||
});
|
||||
|
||||
it('should _not_ migrate outputs that are used with .complete', () => {
|
||||
verifyNoChange(`
|
||||
import {Directive, Output, EventEmitter, OnDestroy} from '@angular/core';
|
||||
|
|
|
|||
Loading…
Reference in a new issue