refactor(ivy): Move instructions back to ɵɵ (#30546)
There is an encoding issue with using delta `Δ`, where the browser will attempt to detect the file encoding if the character set is not explicitly declared on a `<script/>` tag, and Chrome will find the `Δ` character and decide it is window-1252 encoding, which misinterprets the `Δ` character to be some other character that is not a valid JS identifier character So back to the frog eyes we go. ``` __ /ɵɵ\ ( -- ) - I am ineffable. I am forever. _/ \_ / \ / \ == == == ``` PR Close #30546
This commit is contained in:
@ -2113,7 +2113,7 @@ describe('ngc transformer command-line', () => {
|
||||
})
|
||||
export class Service {}
|
||||
`);
|
||||
expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/);
|
||||
expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/);
|
||||
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
||||
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
||||
});
|
||||
@ -2169,7 +2169,7 @@ describe('ngc transformer command-line', () => {
|
||||
})
|
||||
export class Service {}
|
||||
`);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\.Δinject\(Existing\)/);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\.ɵɵinject\(Existing\)/);
|
||||
});
|
||||
|
||||
it('compiles a useFactory InjectableDef with optional dep', () => {
|
||||
@ -2189,7 +2189,7 @@ describe('ngc transformer command-line', () => {
|
||||
constructor(e: Existing|null) {}
|
||||
}
|
||||
`);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 8\)/);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 8\)/);
|
||||
});
|
||||
|
||||
it('compiles a useFactory InjectableDef with skip-self dep', () => {
|
||||
@ -2209,7 +2209,7 @@ describe('ngc transformer command-line', () => {
|
||||
constructor(e: Existing) {}
|
||||
}
|
||||
`);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 4\)/);
|
||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 4\)/);
|
||||
});
|
||||
|
||||
it('compiles a service that depends on a token', () => {
|
||||
@ -2226,7 +2226,7 @@ describe('ngc transformer command-line', () => {
|
||||
constructor(@Inject(TOKEN) value: boolean) {}
|
||||
}
|
||||
`);
|
||||
expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/);
|
||||
expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/);
|
||||
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
||||
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
||||
});
|
||||
@ -2253,7 +2253,7 @@ describe('ngc transformer command-line', () => {
|
||||
constructor(@Inject(TOKEN) token: any) {}
|
||||
}
|
||||
`);
|
||||
expect(source).toMatch(/new Service\(i0\.Δinject\(exports\.TOKEN\)\);/);
|
||||
expect(source).toMatch(/new Service\(i0\.ɵɵinject\(exports\.TOKEN\)\);/);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user