diff --git a/packages/angular_devkit/core/src/workspace/core_spec.ts b/packages/angular_devkit/core/src/workspace/core_spec.ts index 214b26b062d1..f92170be2586 100644 --- a/packages/angular_devkit/core/src/workspace/core_spec.ts +++ b/packages/angular_devkit/core/src/workspace/core_spec.ts @@ -289,7 +289,7 @@ describe('readWorkspace', () => { }); describe('writeWorkspace', () => { - xit('attempts to write to specified file path', async (done) => { + it('attempts to write to specified file path', async (done) => { const requestedPath = '/path/to/workspace/angular.json'; let writtenPath: string | undefined; diff --git a/packages/angular_devkit/core/src/workspace/json/writer.ts b/packages/angular_devkit/core/src/workspace/json/writer.ts index 612258636718..8087d810e5ff 100644 --- a/packages/angular_devkit/core/src/workspace/json/writer.ts +++ b/packages/angular_devkit/core/src/workspace/json/writer.ts @@ -55,7 +55,7 @@ function convertJsonWorkspace(workspace: WorkspaceDefinition, schema?: string): $schema: schema || './node_modules/@angular/cli/lib/config/schema.json', version: 1, ...workspace.extensions, - projects: convertJsonProjectCollection(workspace.projects), + projects: workspace.projects ? convertJsonProjectCollection(workspace.projects) : {}, }; return obj;