test(ngcc): give adjacent class identifier a distinct name (#37206)
To better check that the code is working, this commit gives a distinct name (`DecoratedWrappedClass_1`) to the "adjacent" class declaration in the tests. PR Close #37206
This commit is contained in:
parent
78b8d0e1ef
commit
03fef736d6
|
@ -174,12 +174,13 @@ runInEachFileSystem(() => {
|
|||
];
|
||||
return AliasedWrappedClass;
|
||||
})();
|
||||
let DecoratedWrappedClass = /** @class */ (() => {
|
||||
let DecoratedWrappedClass = class DecoratedWrappedClass {}
|
||||
// ... add decorations ...
|
||||
return DecoratedWrappedClass;
|
||||
})();
|
||||
let usageOfWrappedClass = AliasedWrappedClass_1;
|
||||
let DecoratedWrappedClass = /** @class */ (() => {
|
||||
let DecoratedWrappedClass_1 = class DecoratedWrappedClass {}
|
||||
// ... add decorations ...
|
||||
return DecoratedWrappedClass_1;
|
||||
})();
|
||||
let usageOfDecorated = DecoratedWrappedClass_1;
|
||||
`,
|
||||
};
|
||||
|
||||
|
@ -1970,7 +1971,7 @@ runInEachFileSystem(() => {
|
|||
!isNamedVariableDeclaration(classSymbol.adjacent.valueDeclaration)) {
|
||||
return fail('Expected a named variable declaration for the adjacent symbol');
|
||||
}
|
||||
expect(classSymbol.adjacent.valueDeclaration.name.text).toBe('DecoratedWrappedClass');
|
||||
expect(classSymbol.adjacent.valueDeclaration.name.text).toBe('DecoratedWrappedClass_1');
|
||||
});
|
||||
|
||||
it('should return the class symbol for a decorated wrapped class expression (inner class expression)',
|
||||
|
@ -2000,7 +2001,7 @@ runInEachFileSystem(() => {
|
|||
!isNamedVariableDeclaration(classSymbol.adjacent.valueDeclaration)) {
|
||||
return fail('Expected a named variable declaration for the adjacent symbol');
|
||||
}
|
||||
expect(classSymbol.adjacent.valueDeclaration.name.text).toBe('DecoratedWrappedClass');
|
||||
expect(classSymbol.adjacent.valueDeclaration.name.text).toBe('DecoratedWrappedClass_1');
|
||||
});
|
||||
|
||||
it('should return the same class symbol (of the outer declaration) for decorated wrapped outer and inner declarations',
|
||||
|
|
Loading…
Reference in New Issue