11// tests/DocumentationGenerator.test.js
22const DocumentationGenerator = require ( '../functions/DocumentationGenerator' ) ;
33const FileParsing = require ( '../functions/FileParsing' ) ;
4- const OutputTitle = require ( '../functions/OutputTitlePDF' ) ;
4+ const OutputTitlePDF = require ( '../functions/OutputTitlePDF' ) ;
55const OutputNameFilePDF = require ( '../functions/OutputNameFilePDF' ) ;
66const WritePDF = require ( '../functions/WritePDF' ) ;
77const OutputTitleMarkdown = require ( '../functions/OutputTitleMarkdown' ) ;
88const OutputNameFileMarkdown = require ( '../functions/OutputNameFileMarkdown' ) ;
99const WriteMarkdown = require ( '../functions/WriteMarkdown' ) ;
1010
1111jest . mock ( '../functions/FileParsing' , ( ) => jest . fn ( ) ) ;
12- jest . mock ( '../functions/OutputTitle ' , ( ) => jest . fn ( ) ) ;
12+ jest . mock ( '../functions/OutputTitlePDF ' , ( ) => jest . fn ( ) ) ;
1313jest . mock ( '../functions/OutputNameFilePDF' , ( ) => jest . fn ( ) ) ;
1414jest . mock ( '../functions/WritePDF' , ( ) => jest . fn ( ) ) ;
1515jest . mock ( '../functions/OutputTitleMarkdown' , ( ) => jest . fn ( ) ) ;
@@ -26,13 +26,13 @@ describe('DocumentationGenerator', () => {
2626 const filesParsed = [ { name : 'file1' , functions : [ ] } ] ;
2727
2828 FileParsing . mockResolvedValue ( filesParsed ) ;
29- OutputTitle . mockReturnValue ( 'Test Project Documentation' ) ;
29+ OutputTitlePDF . mockReturnValue ( 'Test Project Documentation' ) ;
3030 OutputNameFilePDF . mockReturnValue ( 'TestProject.pdf' ) ;
3131
3232 await DocumentationGenerator ( formData , rows ) ;
3333
3434 expect ( FileParsing ) . toHaveBeenCalledWith ( formData , rows ) ;
35- expect ( OutputTitle ) . toHaveBeenCalledWith ( 'TestProject' ) ;
35+ expect ( OutputTitlePDF ) . toHaveBeenCalledWith ( 'TestProject' ) ;
3636 expect ( OutputNameFilePDF ) . toHaveBeenCalledWith ( 'TestProject' ) ;
3737 expect ( WritePDF ) . toHaveBeenCalledWith ( 'Test Project Documentation' , 'TestProject.pdf' , filesParsed ) ;
3838 } ) ;
@@ -66,15 +66,15 @@ describe('DocumentationGenerator', () => {
6666 const filesParsed = [ { name : 'file1' , functions : [ ] } ] ;
6767
6868 FileParsing . mockResolvedValue ( filesParsed ) ;
69- OutputTitle . mockReturnValue ( 'Test Project Documentation' ) ;
69+ OutputTitlePDF . mockReturnValue ( 'Test Project Documentation' ) ;
7070 OutputNameFilePDF . mockReturnValue ( 'TestProject.pdf' ) ;
7171 OutputTitleMarkdown . mockReturnValue ( 'Test Project Documentation' ) ;
7272 OutputNameFileMarkdown . mockReturnValue ( 'TestProject.md' ) ;
7373
7474 await DocumentationGenerator ( formData , rows ) ;
7575
7676 expect ( FileParsing ) . toHaveBeenCalledWith ( formData , rows ) ;
77- expect ( OutputTitle ) . toHaveBeenCalledWith ( 'TestProject' ) ;
77+ expect ( OutputTitlePDF ) . toHaveBeenCalledWith ( 'TestProject' ) ;
7878 expect ( OutputNameFilePDF ) . toHaveBeenCalledWith ( 'TestProject' ) ;
7979 expect ( WritePDF ) . toHaveBeenCalledWith ( 'Test Project Documentation' , 'TestProject.pdf' , filesParsed ) ;
8080 expect ( OutputTitleMarkdown ) . toHaveBeenCalledWith ( 'TestProject' ) ;
0 commit comments