Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Commit

Permalink
chore: remove shared dir from new app blueprint (angular#2623)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brocco committed Oct 19, 2016
1 parent 1409c73 commit 58cb790
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
Empty file.
12 changes: 0 additions & 12 deletions tests/acceptance/generate-class.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,4 @@ describe('Acceptance: ng generate class', function () {
expect(existsSync(path.join(testPath, 'my-class.model.ts'))).to.equal(true);
});
});

it(`ng generate class shared${path.sep}my-class`, function () {
return ng(['generate', 'class', 'shared/my-class']).then(() => {
expect(existsSync(path.join(testPath, 'shared', 'my-class.ts'))).to.equal(true);
});
});

it(`ng generate class shared${path.sep}my-class.model`, function () {
return ng(['generate', 'class', 'shared/my-class.model']).then(() => {
expect(existsSync(path.join(testPath, 'shared', 'my-class.model.ts'))).to.equal(true);
});
});
});
14 changes: 0 additions & 14 deletions tests/acceptance/generate-module.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,4 @@ describe('Acceptance: ng generate module', function () {
expect(existsSync(path.join(testPath, 'my-module', 'my-module.module.spec.ts'))).to.equal(true);
});
});

it(`ng generate module shared${path.sep}my-module`, function () {
return ng(['generate', 'module', 'shared/my-module']).then(() => {
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.ts'))).to.equal(true);
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.spec.ts'))).to.equal(false);
});
});

it(`ng generate module shared${path.sep}my-module --spec`, function () {
return ng(['generate', 'module', 'shared/my-module', '--spec']).then(() => {
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.ts'))).to.equal(true);
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.spec.ts'))).to.equal(true);
});
});
});
3 changes: 2 additions & 1 deletion tests/e2e/tests/build/ts-paths.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {updateTsConfig} from '../../utils/project';
import {writeMultipleFiles, appendToFile} from '../../utils/fs';
import {writeMultipleFiles, appendToFile, createDir} from '../../utils/fs';
import {ng} from '../../utils/process';
import {stripIndents} from 'common-tags';

Expand All @@ -16,6 +16,7 @@ export default function() {
]
};
})
.then(() => createDir('src/app/shared'))
.then(() => writeMultipleFiles({
'src/app/shared/meaning.ts': 'export var meaning = 42;',
'src/app/shared/index.ts': `export * from './meaning'`
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export function moveFile(from: string, to: string) {
});
}

export function createDir(path: string) {
_recursiveMkDir(path);
}


function _recursiveMkDir(path: string) {
if (fs.existsSync(path)) {
Expand Down

0 comments on commit 58cb790

Please sign in to comment.