refactor(core): wire up missing-injectable migration for ng-update (#32349)
Initially the `missing-injectable` migration was only being used in google3. Wiring the migration up in the CLI migrations was planned to be done in a follow-up. PR Close #32349
This commit is contained in:

committed by
Miško Hevery

parent
b4d3468088
commit
3af99a7b4a
@ -5,7 +5,6 @@ ts_library(
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
data = [
|
||||
"test-migrations.json",
|
||||
"//packages/core/schematics:migrations.json",
|
||||
],
|
||||
deps = [
|
||||
|
@ -21,7 +21,7 @@ describe('Missing injectable migration', () => {
|
||||
let warnOutput: string[];
|
||||
|
||||
beforeEach(() => {
|
||||
runner = new SchematicTestRunner('test', require.resolve('./test-migrations.json'));
|
||||
runner = new SchematicTestRunner('test', require.resolve('../migrations.json'));
|
||||
host = new TempScopedNodeJsSyncHost();
|
||||
tree = new UnitTestTree(new HostTree(host));
|
||||
|
||||
@ -61,7 +61,7 @@ describe('Missing injectable migration', () => {
|
||||
}
|
||||
|
||||
async function runMigration() {
|
||||
await runner.runSchematicAsync('migration-missing-injectable', {}, tree).toPromise();
|
||||
await runner.runSchematicAsync('migration-v9-missing-injectable', {}, tree).toPromise();
|
||||
}
|
||||
|
||||
it('should migrate type provider in NgModule', async() => {
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
// Migrations which are not publicly enabled but still run as part of tests need to
|
||||
// be part of a schematic collection in order to be able to run it.
|
||||
"schematics": {
|
||||
"migration-missing-injectable": {
|
||||
"description": "Migrates all declared undecorated providers with the @Injectable decorator",
|
||||
"factory": "../migrations/missing-injectable/index"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user