@@ -160,11 +160,25 @@ describe('When generating documentation', () => {
160160 expect ( result ) . documentationBundleHasLength ( 0 ) ;
161161 } ) ;
162162
163- it ( 'does not return non-public custom objects' , async ( ) => {
164- const input = new CustomObjectXmlBuilder ( ) . withVisibility ( 'Protected' ) . build ( ) ;
165-
166- const result = await generateDocs ( [ unparsedObjectBundleFromRawString ( { rawContent : input , filePath : 'test' } ) ] ) ( ) ;
167- expect ( result ) . documentationBundleHasLength ( 0 ) ;
163+ describe ( 'and the custom object visibility' , ( ) => {
164+ it ( 'is not set, it does not return non-public custom objects' , async ( ) => {
165+ const input = new CustomObjectXmlBuilder ( ) . withVisibility ( 'Protected' ) . build ( ) ;
166+
167+ const result = await generateDocs ( [
168+ unparsedObjectBundleFromRawString ( { rawContent : input , filePath : 'test' } ) ,
169+ ] ) ( ) ;
170+ expect ( result ) . documentationBundleHasLength ( 0 ) ;
171+ } ) ;
172+
173+ it ( 'is configured, it respects the configured visibility' , async ( ) => {
174+ const input = new CustomObjectXmlBuilder ( ) . withVisibility ( 'Protected' ) . build ( ) ;
175+
176+ const result = await generateDocs (
177+ [ unparsedObjectBundleFromRawString ( { rawContent : input , filePath : 'test' } ) ] ,
178+ { customObjectVisibility : [ 'protected' ] } ,
179+ ) ( ) ;
180+ expect ( result ) . documentationBundleHasLength ( 1 ) ;
181+ } ) ;
168182 } ) ;
169183
170184 it ( 'do not return files that have an @ignore in the docs' , async ( ) => {
0 commit comments