Skip to content

Commit

Permalink
fix(material/schematics): update test setup function name in template…
Browse files Browse the repository at this point in the history
… migration test
  • Loading branch information
amysorto authored and mmalerba committed Jul 15, 2022
1 parent 425fd7d commit 53b6b52
Showing 1 changed file with 6 additions and 2 deletions.
@@ -1,14 +1,18 @@
import {createTestApp, patchDevkitTreeToExposeTypeScript} from '@angular/cdk/schematics/testing';
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing';
import {createNewTestRunner, migrateComponent, TEMPLATE_FILE} from './components/test-setup-helper';
import {
createNewTestRunner,
migrateComponents,
TEMPLATE_FILE,
} from './components/test-setup-helper';

describe('template migrations', () => {
let runner: SchematicTestRunner;
let cliAppTree: UnitTestTree;

async function runMigrationTest(oldFileContent: string, newFileContent: string) {
cliAppTree.overwrite(TEMPLATE_FILE, oldFileContent);
const tree = await migrateComponent('card', runner, cliAppTree);
const tree = await migrateComponents(['card'], runner, cliAppTree);
expect(tree.readContent(TEMPLATE_FILE)).toBe(newFileContent);
}

Expand Down

0 comments on commit 53b6b52

Please sign in to comment.