mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(compiler-cli): enable incremental re-use type checking with signal inputs (#54819)
Enables the incremental type-checking test that we never enabled when we landed signal inputs. Now that we fixed incremental re-use by re-using the existing user imports for inline type check blocks, the test is passing and can be enabled. PR Close #54819
This commit is contained in:
parent
94bc3afc23
commit
bec0179afe
1 changed files with 13 additions and 14 deletions
|
|
@ -1601,11 +1601,10 @@ runInEachFileSystem(() => {
|
|||
expectCompleteReuse(env.getReuseTsProgram());
|
||||
});
|
||||
|
||||
// TODO(devversion): look into fixing this for inline TCB and inline type ctors.
|
||||
xit('should completely re-use structure when an inline constructor generic directive starts using input signals',
|
||||
() => {
|
||||
env.tsconfig({strictTemplates: true});
|
||||
env.write('dir.ts', `
|
||||
it('should completely re-use structure when an inline constructor generic directive starts using input signals',
|
||||
() => {
|
||||
env.tsconfig({strictTemplates: true});
|
||||
env.write('dir.ts', `
|
||||
import {Directive, Input} from '@angular/core';
|
||||
|
||||
class SomeNonExportedClass {}
|
||||
|
|
@ -1617,7 +1616,7 @@ runInEachFileSystem(() => {
|
|||
@Input() dir: T|undefined;
|
||||
}
|
||||
`);
|
||||
env.write('cmp.ts', `
|
||||
env.write('cmp.ts', `
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
|
|
@ -1628,7 +1627,7 @@ runInEachFileSystem(() => {
|
|||
foo = 'foo';
|
||||
}
|
||||
`);
|
||||
env.write('mod.ts', `
|
||||
env.write('mod.ts', `
|
||||
import {NgModule} from '@angular/core';
|
||||
import {Cmp} from './cmp';
|
||||
import {Dir} from './dir';
|
||||
|
|
@ -1638,10 +1637,10 @@ runInEachFileSystem(() => {
|
|||
})
|
||||
export class Mod {}
|
||||
`);
|
||||
env.driveMain();
|
||||
env.driveMain();
|
||||
|
||||
// turn the input into a signal input- causing a new import.
|
||||
env.write('dir.ts', `
|
||||
// turn the input into a signal input- causing a new import.
|
||||
env.write('dir.ts', `
|
||||
import {Directive, input} from '@angular/core';
|
||||
|
||||
class SomeNonExportedClass {}
|
||||
|
|
@ -1653,11 +1652,11 @@ runInEachFileSystem(() => {
|
|||
dir = input.required<T>();
|
||||
}
|
||||
`);
|
||||
env.driveMain();
|
||||
env.driveMain();
|
||||
|
||||
expectCompleteReuse(env.getTsProgram());
|
||||
expectCompleteReuse(env.getReuseTsProgram());
|
||||
});
|
||||
expectCompleteReuse(env.getTsProgram());
|
||||
expectCompleteReuse(env.getReuseTsProgram());
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue