From a2e8b3a6a80432d139abff64e9ad6baf1eb13dee Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 14 May 2018 17:25:41 +0100 Subject: [PATCH] build(aio): ensure usageNotes are copied into decorator API docs (#23901) PR Close #23901 --- .../angular-api-package/processors/mergeDecoratorDocs.js | 3 +-- .../processors/mergeDecoratorDocs.spec.js | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.js b/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.js index 6227dbb3d8..86571ea5fa 100644 --- a/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.js +++ b/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.js @@ -90,8 +90,7 @@ module.exports = function mergeDecoratorDocs(log) { callMember.description.substring(0, 50)); // Merge the documentation found in this call signature into the original decorator decoratorDoc.description = callMember.description; - decoratorDoc.howToUse = callMember.howToUse; - decoratorDoc.whatItDoes = callMember.whatItDoes; + decoratorDoc.usageNotes = callMember.usageNotes; // remove doc from its module doc's exports doc.moduleDoc.exports = diff --git a/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.spec.js b/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.spec.js index be6cff2e4b..77b3f2593d 100644 --- a/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.spec.js +++ b/aio/tools/transforms/angular-api-package/processors/mergeDecoratorDocs.spec.js @@ -32,8 +32,7 @@ describe('mergeDecoratorDocs processor', () => { { isCallMember: true, description: 'The actual description of the call signature', - whatItDoes: 'Does something cool...', - howToUse: 'Use it like this...' + usageNotes: 'Use it like this...' }, { description: 'Some other member' @@ -69,8 +68,7 @@ describe('mergeDecoratorDocs processor', () => { it('should copy across properties from the call signature doc', () => { processor.$process([decoratorDoc, metadataDoc, otherDoc]); expect(decoratorDoc.description).toEqual('The actual description of the call signature'); - expect(decoratorDoc.whatItDoes).toEqual('Does something cool...'); - expect(decoratorDoc.howToUse).toEqual('Use it like this...'); + expect(decoratorDoc.usageNotes).toEqual('Use it like this...'); }); it('should remove the metadataDoc from the module exports', () => {