refactor(compiler-cli): remove a test that we no longer care about (#25649)

Alex R. says that we no longer care about the behavior this is testing.

PR Close #25649
This commit is contained in:
Alex Eagle 2018-08-27 10:35:12 -07:00 committed by Matias Niemelä
parent 0386c44acc
commit a22fb91e1a
1 changed files with 0 additions and 30 deletions

View File

@ -2364,36 +2364,6 @@ describe('ngc transformer command-line', () => {
'Module.ngInjectorDef = i0.defineInjector({ factory: function Module_Factory() { return new Module(); }, providers: ɵ1, imports: [ɵ2, ɵ3] });');
});
it('strips decorator in ivy mode', () => {
writeConfig(`{
"extends": "./tsconfig-base.json",
"files": ["service.ts"],
"angularCompilerOptions": {
"enableIvy": true
}
}`);
write('service.ts', `
import {Injectable, Self} from '@angular/core';
@Injectable()
export class ServiceA {}
@Injectable()
@Self()
export class ServiceB {}
`);
const exitCode = main(['-p', path.join(basePath, 'tsconfig.json')], errorSpy);
expect(exitCode).toEqual(0);
const modulePath = path.resolve(outDir, 'service.js');
const moduleSource = fs.readFileSync(modulePath, 'utf8');
expect(moduleSource).not.toMatch(/ServiceA\.decorators =/);
expect(moduleSource).toMatch(/ServiceB\.decorators =/);
expect(moduleSource).toMatch(/type: Self/);
expect(moduleSource).not.toMatch(/type: Injectable/);
});
it('rewrites Injector to INJECTOR in Ivy factory functions ', () => {
writeConfig(`{
"extends": "./tsconfig-base.json",