@@ -66,7 +66,10 @@ describe('getReleaseNotes', () => {
6666 const mockRepoUrl = 'https://github.com/Org/Name' ;
6767 const mockVersion = '1.0.0' ;
6868 const mockChangelog = 'a changelog' ;
69- const mockRelease = 'a mock release' ;
69+ const mockReleaseBody = 'a mock release' ;
70+ // getStringifiedRelease returns a string whose first line is a markdown
71+ // e.g. "## 1.0.0\n". This is stripped by getReleaseNotes.
72+ const mockRelease = `## Header\n${ mockReleaseBody } ` ;
7073
7174 parseEnvVariablesMock . mockImplementationOnce ( ( ) => {
7275 return {
@@ -109,7 +112,7 @@ describe('getReleaseNotes', () => {
109112 expect ( exportActionVariableMock ) . toHaveBeenCalledTimes ( 1 ) ;
110113 expect ( exportActionVariableMock ) . toHaveBeenCalledWith (
111114 'RELEASE_NOTES' ,
112- `${ mockRelease } \n\n` ,
115+ `${ mockReleaseBody } \n\n` ,
113116 ) ;
114117 } ) ;
115118
@@ -162,7 +165,10 @@ describe('getReleaseNotes', () => {
162165 ) ;
163166
164167 const getStringifiedReleaseMockFactory = ( workspace : string ) => {
165- return ( version : string ) => `release ${ version } for ${ workspace } ` ;
168+ // getStringifiedRelease returns a string whose first line is a markdown
169+ // e.g. "## 1.0.0\n". This is stripped by getReleaseNotes.
170+ return ( version : string ) =>
171+ `## Header\nrelease ${ version } for ${ workspace } ` ;
166172 } ;
167173 parseChangelogMock . mockImplementation (
168174 ( { changelogContent } : { changelogContent : string } ) => {
0 commit comments