docs(aio): update universal for CLI

PR Close #20039
This commit is contained in:
Jesus Rodriguez
2017-10-30 23:39:58 +01:00
committed by Matias Niemelä
parent ca129ba549
commit c30eff898a
62 changed files with 1062 additions and 1149 deletions

View File

@ -12,6 +12,7 @@ describe('example-boilerplate tool', () => {
const BPFiles = {
cli: 18,
i18n: 1,
universal: 2,
systemjs: 7,
common: 1
};
@ -88,6 +89,21 @@ describe('example-boilerplate tool', () => {
expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/common`, 'c/d', 'src/styles.css');
});
it('should copy all the source boilerplate files for universal', () => {
const boilerplateDir = path.resolve(sharedDir, 'boilerplate');
exampleBoilerPlate.loadJsonFile.and.callFake(filePath => filePath.indexOf('a/b') !== -1 ? { projectType: 'universal' } : {})
exampleBoilerPlate.add();
expect(exampleBoilerPlate.copyFile).toHaveBeenCalledTimes(
(BPFiles.cli + BPFiles.universal) +
(BPFiles.cli) +
(BPFiles.common * exampleFolders.length)
);
// for example
expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/universal`, 'a/b', '../cli/tslint.json');
expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/universal`, 'a/b', '.angular-cli.json');
expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/common`, 'c/d', 'src/styles.css');
});
it('should try to load the example config file', () => {
exampleBoilerPlate.add();
expect(exampleBoilerPlate.loadJsonFile).toHaveBeenCalledTimes(exampleFolders.length);