当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Tree.empty方法代码示例

本文整理汇总了TypeScript中@angular-devkit/schematics.Tree.empty方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Tree.empty方法的具体用法?TypeScript Tree.empty怎么用?TypeScript Tree.empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular-devkit/schematics.Tree的用法示例。


在下文中一共展示了Tree.empty方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

  it('works', () => {
    const runner = new SchematicTestRunner('schematics', collectionPath);
    const tree = runner.runSchematic('my-full-schematic', { required: 'str' }, Tree.empty());

    // Listing files
    expect(tree.files.sort()).toEqual(['/allo', '/hola']);
  });
开发者ID:MathieuNls,项目名称:Angular-2-Design-Patterns-and-Best-Practices,代码行数:7,代码来源:index_spec.ts

示例2: it

  it('works', () => {
    const runner = new SchematicTestRunner('schematics', collectionPath);
    const tree = runner.runSchematic('add', {
      module: 'app'
    }, Tree.empty());

    expect(tree.files).toEqual(['/hello']);
  });
开发者ID:beqom,项目名称:clarity,代码行数:8,代码来源:index_spec.ts

示例3: it

    it(`should install version ${prefix}6.0.0`, () => {
      appTree = new UnitTestTree(Tree.empty());
      const runner = new SchematicTestRunner('schematics', collectionPath);
      const tree = createPackageJson(prefix, pkgName, appTree);

      const newTree = runner.runSchematic(
        `ngrx-${pkgName}-migration-01`,
        {},
        tree
      );
      const pkg = JSON.parse(newTree.readContent(packagePath));
      expect(pkg.dependencies[`@ngrx/${pkgName}`]).toBe(
        `${prefix}${upgradeVersion}`
      );
    });
开发者ID:AlexChar,项目名称:platform,代码行数:15,代码来源:index.spec.ts

示例4: beforeEach

 beforeEach(() => {
   tree = Tree.empty() as UnitTestTree;
   tree.create('/package.json', `{}`);
 });
开发者ID:DallanQ,项目名称:rxjs,代码行数:4,代码来源:index-spec.ts

示例5: it

  it('works', () => {
    const runner = new SchematicTestRunner('schematics', collectionPath);
    const tree = runner.runSchematic('new-component', {}, Tree.empty());

    expect(tree.files).toEqual([]);
  });
开发者ID:kevinheader,项目名称:nebular,代码行数:6,代码来源:index_spec.ts

示例6: it

  it('works', () => {
    const runner = new SchematicTestRunner('schematics', collectionPath);
    const tree = runner.runSchematic('my-other-schematic', {}, Tree.empty());

    expect(tree.files.sort()).toEqual(['/allo', '/hola']);
  });
开发者ID:DevIntent,项目名称:angular-cli,代码行数:6,代码来源:index_spec.ts

示例7: expect

 expect(() => runner.runSchematic('my-full-schematic', {}, Tree.empty())).toThrow();
开发者ID:MathieuNls,项目名称:Angular-2-Design-Patterns-and-Best-Practices,代码行数:1,代码来源:index_spec.ts


注:本文中的@angular-devkit/schematics.Tree.empty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。