How to use the @angular-devkit/schematics.Tree.empty function in @angular-devkit/schematics

To help you get started, we’ve selected a few @angular-devkit/schematics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timdeschryver / frontal / projects / frontal / __tests__ / migrations / 3_0_0.ts View on Github external
function setup(prefix: string, version: string) {
  const tree = Tree.empty() as UnitTestTree;
  tree.create(
    packagePath,
    `{
        "dependencies": {
          "frontal": "${prefix}${version}"
        }
      }`,
  );

  return {
    tree,
    runner: new SchematicTestRunner('schematics', collectionPath),
  };
}
github nrwl / nx / packages / cypress / src / schematics / init / init.spec.ts View on Github external
beforeEach(() => {
    appTree = Tree.empty();
    appTree = createEmptyWorkspace(appTree);
  });
github nstudio / xplat / packages / nativescript-angular / src / schematics / xplat / index.spec.ts View on Github external
beforeEach(() => {
    appTree = Tree.empty();
    appTree = createEmptyWorkspace(appTree, 'angular');
  });
github nrwl / nx / packages / schematics / migrations / update-6-2-0 / update-6-2-0.spec.ts View on Github external
beforeEach(() => {
    initialTree = Tree.empty();
    initialTree.create(
      'package.json',
      serializeJson({
        dependencies: {
          '@angular/animations': '6.0.1',
          '@angular/common': '6.0.1',
          '@angular/compiler': '6.0.1',
          '@angular/core': '6.0.1',
          '@angular/forms': '6.0.1',
          '@angular/platform-browser': '6.0.1',
          '@angular/platform-browser-dynamic': '6.0.1',
          '@angular/router': '6.0.1',
          'core-js': '^2.5.4',
          rxjs: '6.0.0',
          'zone.js': '^0.8.26',
          '@nrwl/nx': '6.1.0',
github nrwl / nx / packages / node / src / schematics / application / application.spec.ts View on Github external
beforeEach(() => {
    appTree = Tree.empty();
    appTree = createEmptyWorkspace(appTree);
  });
github nrwl / nx / packages / angular / src / schematics / library / library.spec.ts View on Github external
beforeEach(() => {
    appTree = Tree.empty();
    appTree = createEmptyWorkspace(appTree);
  });
github nrwl / nx / packages / angular / src / schematics / init / init.spec.ts View on Github external
beforeEach(() => {
    appTree = createEmptyWorkspace(Tree.empty());
  });
github nstudio / xplat / packages / angular / src / schematics / helpers / index.spec.ts View on Github external
beforeEach(() => {
    appTree = Tree.empty();
    appTree = createXplatWithApps(appTree);
  });