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CAAC;IACzC,MAAM,UAAU,GAAY,UAAU,CAAC,YAAY,EAAE,CAAC;IAEtD,2BAA2B;IAC1B,UAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAEtD,MAAM,CAAC,GAAG,EAAE;QACV,iCAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC,YAAY,CAAC,0EAA0E,CAAC,CAAC;AAC9F,CAAC,CAAC,CAAC","sourcesContent":["import { TSDocConfiguration, TSDocTagDefinition, TSDocTagSyntaxKind } from '@microsoft/tsdoc';\r\nimport * as path from 'path';\r\n\r\nimport { TSDocConfigFile } from '../TSDocConfigFile';\r\n\r\nfunction getRelativePath(testPath: string): string {\r\n return path.relative(__dirname, testPath).split('\\\\').join('/');\r\n}\r\n\r\nexpect.addSnapshotSerializer({\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n test(value: any) {\r\n return value instanceof TSDocConfigFile;\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n print(value: unknown, print: (value: any) => string, indent: any, options: any, colors: any): any {\r\n const configFile: TSDocConfigFile = value as TSDocConfigFile;\r\n return print({\r\n tsdocSchema: configFile.tsdocSchema,\r\n filePath: getRelativePath(configFile.filePath),\r\n fileNotFound: configFile.fileNotFound,\r\n extendsPaths: configFile.extendsPaths,\r\n extendsFiles: configFile.extendsFiles,\r\n noStandardTags: configFile.noStandardTags,\r\n tagDefinitions: configFile.tagDefinitions,\r\n supportForTags: Array.from(configFile.supportForTags).map(([tagName, supported]) => ({ tagName, supported })),\r\n messages: configFile.log.messages,\r\n supportedHtmlElements: configFile.supportedHtmlElements,\r\n reportUnsupportedHtmlElements: configFile.reportUnsupportedHtmlElements,\r\n });\r\n },\r\n});\r\n\r\nfunction testLoadingFolder(assetPath: string): TSDocConfigFile {\r\n return TSDocConfigFile.loadForFolder(path.join(__dirname, assetPath));\r\n}\r\n\r\ntest('Load p1', () => {\r\n expect(testLoadingFolder('assets/p1')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p1/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('Load p2', () => {\r\n expect(testLoadingFolder('assets/p2')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": true,\r\n \"filePath\": \"assets/p2/tsdoc.json\",\r\n \"messages\": Array [\r\n ParserMessage {\r\n \"_text\": undefined,\r\n \"docNode\": undefined,\r\n \"messageId\": \"tsdoc-config-file-not-found\",\r\n \"textRange\": TextRange {\r\n \"buffer\": \"\",\r\n \"end\": 0,\r\n \"pos\": 0,\r\n },\r\n \"tokenSequence\": undefined,\r\n \"unformattedText\": \"File not found\",\r\n },\r\n ],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"\",\r\n }\r\n `);\r\n});\r\n\r\ntest('Load p3', () => {\r\n expect(testLoadingFolder('assets/p3')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p3/base1/tsdoc-base1.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [\r\n Object {\r\n \"supported\": true,\r\n \"tagName\": \"@base1\",\r\n },\r\n ],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [\r\n TSDocTagDefinition {\r\n \"allowMultiple\": false,\r\n \"standardization\": \"None\",\r\n \"syntaxKind\": 2,\r\n \"tagName\": \"@base1\",\r\n \"tagNameWithUpperCase\": \"@BASE1\",\r\n },\r\n ],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n },\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p3/base2/tsdoc-base2.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [\r\n Object {\r\n \"supported\": false,\r\n \"tagName\": \"@base2\",\r\n },\r\n ],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [\r\n TSDocTagDefinition {\r\n \"allowMultiple\": false,\r\n \"standardization\": \"None\",\r\n \"syntaxKind\": 2,\r\n \"tagName\": \"@base2\",\r\n \"tagNameWithUpperCase\": \"@BASE2\",\r\n },\r\n ],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n },\r\n ],\r\n \"extendsPaths\": Array [\r\n \"./base1/tsdoc-base1.json\",\r\n \"./base2/tsdoc-base2.json\",\r\n ],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p3/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [\r\n Object {\r\n \"supported\": true,\r\n \"tagName\": \"@base2\",\r\n },\r\n ],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [\r\n TSDocTagDefinition {\r\n \"allowMultiple\": false,\r\n \"standardization\": \"None\",\r\n \"syntaxKind\": 2,\r\n \"tagName\": \"@root\",\r\n \"tagNameWithUpperCase\": \"@ROOT\",\r\n },\r\n ],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('Load p4', () => {\r\n expect(testLoadingFolder('assets/p4')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p4/node_modules/example-lib/dist/tsdoc-example.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [\r\n TSDocTagDefinition {\r\n \"allowMultiple\": false,\r\n \"standardization\": \"None\",\r\n \"syntaxKind\": 2,\r\n \"tagName\": \"@example\",\r\n \"tagNameWithUpperCase\": \"@EXAMPLE\",\r\n },\r\n ],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n },\r\n ],\r\n \"extendsPaths\": Array [\r\n \"example-lib/dist/tsdoc-example.json\",\r\n ],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p4/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [\r\n TSDocTagDefinition {\r\n \"allowMultiple\": false,\r\n \"standardization\": \"None\",\r\n \"syntaxKind\": 2,\r\n \"tagName\": \"@root\",\r\n \"tagNameWithUpperCase\": \"@ROOT\",\r\n },\r\n ],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('Re-serialize p3', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p3'));\r\n expect(configFile.hasErrors).toBe(false);\r\n\r\n // This is the data from p3/tsdoc.json, ignoring its \"extends\" field.\r\n expect(configFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"supportForTags\": Object {\r\n \"@base2\": true,\r\n },\r\n \"tagDefinitions\": Array [\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@root\",\r\n },\r\n ],\r\n }\r\n `);\r\n});\r\n\r\ntest('Re-serialize p3 without defaults', () => {\r\n const parserConfiguration: TSDocConfiguration = new TSDocConfiguration();\r\n parserConfiguration.clear(true);\r\n\r\n const defaultsConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(parserConfiguration);\r\n expect(defaultsConfigFile.hasErrors).toBe(false);\r\n\r\n // This is the default configuration created by the TSDocConfigFile constructor.\r\n expect(defaultsConfigFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"noStandardTags\": true,\r\n \"reportUnsupportedHtmlElements\": false,\r\n }\r\n `);\r\n\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p3'));\r\n expect(configFile.hasErrors).toBe(false);\r\n configFile.noStandardTags = true;\r\n configFile.configureParser(parserConfiguration);\r\n\r\n const mergedConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(parserConfiguration);\r\n\r\n // This is the result of merging p3/tsdoc.json, tsdoc-base1.json, tsdoc-base2.json, and\r\n // the TSDocConfiguration defaults.\r\n expect(mergedConfigFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"noStandardTags\": true,\r\n \"reportUnsupportedHtmlElements\": false,\r\n \"supportForTags\": Object {\r\n \"@base1\": true,\r\n \"@base2\": true,\r\n },\r\n \"tagDefinitions\": Array [\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@base1\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@base2\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@root\",\r\n },\r\n ],\r\n }\r\n `);\r\n});\r\n\r\ntest('Re-serialize p3 with defaults', () => {\r\n const parserConfiguration: TSDocConfiguration = new TSDocConfiguration();\r\n\r\n const defaultsConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(parserConfiguration);\r\n expect(defaultsConfigFile.hasErrors).toBe(false);\r\n\r\n // This is the default configuration created by the TSDocConfigFile constructor.\r\n expect(defaultsConfigFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"noStandardTags\": true,\r\n \"reportUnsupportedHtmlElements\": false,\r\n \"tagDefinitions\": Array [\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@alpha\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@beta\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@defaultValue\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@decorator\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@deprecated\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@eventProperty\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@example\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@experimental\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@inheritDoc\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@internal\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@label\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@link\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@override\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@packageDocumentation\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@param\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@privateRemarks\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@public\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@readonly\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@remarks\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@returns\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@sealed\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@see\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@throws\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@typeParam\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@virtual\",\r\n },\r\n ],\r\n }\r\n `);\r\n\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p3'));\r\n expect(configFile.hasErrors).toBe(false);\r\n configFile.configureParser(parserConfiguration);\r\n\r\n const mergedConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(parserConfiguration);\r\n\r\n // This is the result of merging p3/tsdoc.json, tsdoc-base1.json, tsdoc-base2.json, and\r\n // the TSDocConfiguration defaults.\r\n expect(mergedConfigFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"noStandardTags\": true,\r\n \"reportUnsupportedHtmlElements\": false,\r\n \"supportForTags\": Object {\r\n \"@base1\": true,\r\n \"@base2\": true,\r\n },\r\n \"tagDefinitions\": Array [\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@alpha\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@beta\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@defaultValue\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@decorator\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@deprecated\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@eventProperty\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@example\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@experimental\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@inheritDoc\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@internal\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@label\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@link\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@override\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@packageDocumentation\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@param\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@privateRemarks\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@public\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@readonly\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@remarks\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@returns\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@sealed\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@see\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@throws\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@typeParam\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@virtual\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@base1\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@base2\",\r\n },\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@root\",\r\n },\r\n ],\r\n }\r\n `);\r\n});\r\n\r\ntest('Test noStandardTags for p5', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p5'));\r\n expect(configFile.hasErrors).toBe(false);\r\n\r\n const configuration: TSDocConfiguration = new TSDocConfiguration();\r\n configFile.configureParser(configuration);\r\n\r\n // noStandardTags=true because tsdoc-base2.json overrides tsdoc-base1.json, and tsdoc.json is undefined\r\n expect(configuration.tagDefinitions.length).toEqual(0);\r\n});\r\n\r\ntest('Test noStandardTags for p6', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p6'));\r\n expect(configFile.hasErrors).toBe(false);\r\n\r\n const configuration: TSDocConfiguration = new TSDocConfiguration();\r\n configFile.configureParser(configuration);\r\n\r\n // noStandardTags=false because tsdoc.json overrides tsdoc-base1.json\r\n expect(configuration.tagDefinitions.length).toBeGreaterThan(0);\r\n});\r\n\r\ntest('Test load p7', () => {\r\n expect(testLoadingFolder('assets/p7')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p7/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": Array [\r\n \"b\",\r\n \"u\",\r\n ],\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('p7 reportUnsupportedHtmlElements defaults to true when supportedHtmlElements is specified', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p7'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.validation.reportUnsupportedHtmlElements).toEqual(true);\r\n});\r\n\r\ntest('Test re-serialize p7', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p7'));\r\n expect(configFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"supportedHtmlElements\": Array [\r\n \"b\",\r\n \"u\",\r\n ],\r\n }\r\n `);\r\n});\r\n\r\ntest('Test load p8', () => {\r\n expect(testLoadingFolder('assets/p8')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p8/base1/tsdoc-base1.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": Array [\r\n \"span\",\r\n \"p\",\r\n ],\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n },\r\n ],\r\n \"extendsPaths\": Array [\r\n \"./base1/tsdoc-base1.json\",\r\n ],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p8/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": undefined,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": Array [],\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('p8 supportedHtmlElements are not inherited when an empty array is specified', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p8'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.supportedHtmlElements).toEqual([]);\r\n});\r\n\r\ntest('Test re-serialize p8', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p8'));\r\n expect(configFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"supportedHtmlElements\": Array [],\r\n }\r\n `);\r\n});\r\n\r\ntest('Test load p9', () => {\r\n expect(testLoadingFolder('assets/p9')).toMatchInlineSnapshot(`\r\n Object {\r\n \"extendsFiles\": Array [\r\n Object {\r\n \"extendsFiles\": Array [],\r\n \"extendsPaths\": Array [],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p9/base1/tsdoc-base1.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": true,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": Array [\r\n \"span\",\r\n \"p\",\r\n ],\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n },\r\n ],\r\n \"extendsPaths\": Array [\r\n \"./base1/tsdoc-base1.json\",\r\n ],\r\n \"fileNotFound\": false,\r\n \"filePath\": \"assets/p9/tsdoc.json\",\r\n \"messages\": Array [],\r\n \"noStandardTags\": undefined,\r\n \"reportUnsupportedHtmlElements\": false,\r\n \"supportForTags\": Array [],\r\n \"supportedHtmlElements\": undefined,\r\n \"tagDefinitions\": Array [],\r\n \"tsdocSchema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n }\r\n `);\r\n});\r\n\r\ntest('p9 supportedHtmlElements are inherited', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p9'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.supportedHtmlElements).toEqual(['span', 'p']);\r\n});\r\n\r\ntest('p9 reportUnsupportedHtmlElements is overridden by \"true\"', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p9'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.validation.reportUnsupportedHtmlElements).toEqual(false);\r\n});\r\n\r\ntest('Test re-serialize p9', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p9'));\r\n expect(configFile.saveToObject()).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"reportUnsupportedHtmlElements\": false,\r\n }\r\n `);\r\n});\r\n\r\ntest('p10 reportUnsupportedHtmlElements is overridden by \"false\"', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p10'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.validation.reportUnsupportedHtmlElements).toEqual(true);\r\n});\r\n\r\ntest('p11 reportUnsupportedHtmlElements is handled correctly with multiple parent configs', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p11'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.validation.reportUnsupportedHtmlElements).toEqual(true);\r\n});\r\n\r\ntest('p12 reportUnsupportedHtmlElements can be set to false, even when \"supportedHtmlElements\" is present', () => {\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.join(__dirname, 'assets/p12'));\r\n const flattened = new TSDocConfiguration();\r\n configFile.updateParser(flattened);\r\n expect(flattened.validation.reportUnsupportedHtmlElements).toEqual(false);\r\n});\r\n\r\ntest('Test loadFromObject()', () => {\r\n const configuration: TSDocConfiguration = new TSDocConfiguration();\r\n configuration.clear(true);\r\n\r\n configuration.addTagDefinitions([\r\n new TSDocTagDefinition({ syntaxKind: TSDocTagSyntaxKind.ModifierTag, tagName: '@tag1' }),\r\n new TSDocTagDefinition({ syntaxKind: TSDocTagSyntaxKind.BlockTag, tagName: '@tag2', allowMultiple: true }),\r\n new TSDocTagDefinition({ syntaxKind: TSDocTagSyntaxKind.InlineTag, tagName: '@tag3', allowMultiple: true }),\r\n ]);\r\n\r\n configuration.setSupportForTag(configuration.tagDefinitions[0], true);\r\n\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(configuration);\r\n expect(configFile.hasErrors).toBe(false);\r\n const jsonObject: unknown = configFile.saveToObject();\r\n\r\n const configFile2: TSDocConfigFile = TSDocConfigFile.loadFromObject(jsonObject);\r\n expect(configFile2.hasErrors).toBe(false);\r\n const jsonObject2: unknown = configFile2.saveToObject();\r\n\r\n expect(jsonObject2).toMatchInlineSnapshot(`\r\n Object {\r\n \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n \"noStandardTags\": true,\r\n \"reportUnsupportedHtmlElements\": false,\r\n \"supportForTags\": Object {\r\n \"@tag1\": true,\r\n },\r\n \"tagDefinitions\": Array [\r\n Object {\r\n \"syntaxKind\": \"modifier\",\r\n \"tagName\": \"@tag1\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"block\",\r\n \"tagName\": \"@tag2\",\r\n },\r\n Object {\r\n \"allowMultiple\": true,\r\n \"syntaxKind\": \"inline\",\r\n \"tagName\": \"@tag3\",\r\n },\r\n ],\r\n }\r\n `);\r\n\r\n expect(jsonObject2).toStrictEqual(jsonObject);\r\n});\r\n\r\ntest('Test loadFromObject() with extends', () => {\r\n const configuration: TSDocConfiguration = new TSDocConfiguration();\r\n configuration.clear(true);\r\n\r\n const configFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(configuration);\r\n expect(configFile.hasErrors).toBe(false);\r\n const jsonObject: unknown = configFile.saveToObject();\r\n\r\n // eslint-disable-next-line\r\n (jsonObject as any)['extends'] = ['./some-file.json'];\r\n\r\n expect(() => {\r\n TSDocConfigFile.loadFromObject(jsonObject);\r\n }).toThrowError('The \"extends\" field cannot be used with TSDocConfigFile.loadFromObject()');\r\n});\r\n"]}