當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。