test(@angular-devkit/schematics): use HostTree instead of VirtualTree

This commit is contained in:
Charles Lyding 2018-06-14 09:03:42 -04:00 committed by clydin
parent e0720b7f62
commit af8e7ea333
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
// tslint:disable:non-null-operator
import { of as observableOf } from 'rxjs';
import { SchematicContext } from '../engine/interface';
import { VirtualTree } from '../tree/virtual';
import { HostTree } from '../tree/host-tree';
import { callRule } from './call';
import { move } from './move';
@ -18,7 +18,7 @@ const context: SchematicContext = null !;
describe('move', () => {
it('works on moving the whole structure', done => {
const tree = new VirtualTree();
const tree = new HostTree();
tree.create('a/b/file1', 'hello world');
tree.create('a/b/file2', 'hello world');
tree.create('a/c/file3', 'hello world');
@ -34,7 +34,7 @@ describe('move', () => {
});
it('works on moving a subdirectory structure', done => {
const tree = new VirtualTree();
const tree = new HostTree();
tree.create('a/b/file1', 'hello world');
tree.create('a/b/file2', 'hello world');
tree.create('a/c/file3', 'hello world');

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import { Source } from '../engine/interface';
import { VirtualTree } from '../tree/virtual';
import { HostTree } from '../tree/host-tree';
function generateStringOfLength(l: number) {
@ -32,7 +32,7 @@ export default function(options: RandomOptions): Source {
return () => {
const root = ('root' in options) ? options.root : '/';
const map = new VirtualTree();
const map = new HostTree();
const nbFiles = ('multiFiles' in options)
? (typeof options.multiFiles == 'number' ? options.multiFiles : random(2, 12))
: 1;