-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reimplement presets to work with the new package layout
- Loading branch information
Showing
10 changed files
with
441 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,3 @@ | ||
describe('ng-new', () => { | ||
it('should work', () => {}); | ||
// const schematicRunner = new SchematicTestRunner( | ||
// '@nrwl/workspace', | ||
// path.join(__dirname, '../../collection.json') | ||
// ); | ||
// | ||
// let projectTree: Tree; | ||
// | ||
// beforeEach(() => { | ||
// projectTree = Tree.empty(); | ||
// }); | ||
// | ||
// it('should create files (preset = angular)', async () => { | ||
// const tree = await schematicRunner | ||
// .runSchematicAsync( | ||
// 'ng-new', | ||
// { name: 'proj', preset: 'angular' }, | ||
// projectTree | ||
// ) | ||
// .toPromise(); | ||
// expect(tree.exists('/proj/apps/proj/src/app/app.component.ts')).toBe(true); | ||
// | ||
// expect( | ||
// JSON.parse(tree.readContent('/proj/angular.json')).schematics[ | ||
// '@nrwl/workspace:application' | ||
// ].framework | ||
// ).toBe(Framework.Angular); | ||
// }); | ||
// | ||
// it('should create files (preset = react)', async () => { | ||
// const tree = await schematicRunner | ||
// .runSchematicAsync( | ||
// 'ng-new', | ||
// { name: 'proj', preset: 'react' }, | ||
// projectTree | ||
// ) | ||
// .toPromise(); | ||
// expect(tree.exists('/proj/apps/proj/src/main.tsx')).toBe(true); | ||
// expect( | ||
// JSON.parse(tree.readContent('/proj/angular.json')).schematics[ | ||
// '@nrwl/workspace:application' | ||
// ].framework | ||
// ).toBe(Framework.React); | ||
// }); | ||
// | ||
// it('should create files (preset = web-components)', async () => { | ||
// const tree = await schematicRunner | ||
// .runSchematicAsync( | ||
// 'ng-new', | ||
// { name: 'proj', preset: 'web-components' }, | ||
// projectTree | ||
// ) | ||
// .toPromise(); | ||
// expect(tree.exists('/proj/apps/proj/src/main.ts')).toBe(true); | ||
// expect( | ||
// JSON.parse(tree.readContent('/proj/angular.json')).schematics[ | ||
// '@nrwl/workspace:application' | ||
// ].framework | ||
// ).toBe(Framework.WebComponents); | ||
// }); | ||
// | ||
// describe('--preset full-stack', () => { | ||
// it('should create files', async () => { | ||
// const tree = await schematicRunner | ||
// .runSchematicAsync( | ||
// 'ng-new', | ||
// { name: 'proj', preset: 'full-stack' }, | ||
// projectTree | ||
// ) | ||
// .toPromise(); | ||
// expect(tree.exists('/proj/apps/proj/src/app/app.component.ts')).toBe( | ||
// true | ||
// ); | ||
// expect(tree.exists('/proj/apps/api/src/app/app.controller.ts')).toBe( | ||
// true | ||
// ); | ||
// expect( | ||
// tree.exists('/proj/libs/api-interface/src/lib/interfaces.ts') | ||
// ).toBe(true); | ||
// }); | ||
// | ||
// it('should work with unnormalized names', async () => { | ||
// const tree = await schematicRunner | ||
// .runSchematicAsync( | ||
// 'ng-new', | ||
// { name: 'myProj', preset: 'full-stack' }, | ||
// projectTree | ||
// ) | ||
// .toPromise(); | ||
// | ||
// expect( | ||
// tree.exists('/my-proj/apps/my-proj/src/app/app.component.ts') | ||
// ).toBe(true); | ||
// expect(tree.exists('/my-proj/apps/api/src/app/app.controller.ts')).toBe( | ||
// true | ||
// ); | ||
// expect( | ||
// tree.exists('/my-proj/libs/api-interface/src/lib/interfaces.ts') | ||
// ).toBe(true); | ||
// }); | ||
// }); | ||
it('one day we will have a test here', () => {}); | ||
}); |
Oops, something went wrong.