Skip to content

Commit

Permalink
add a failing test for case-sensitive CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Jan 24, 2024
1 parent cfbbc4d commit e406cdd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/prepare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,36 @@ thing v1.0.0 (major)
`);
});
});

it('updates changelog correctly with case insensitive CHANGELOG', function () {
mocks.readFileSync.mockReturnValue(`# A Totally ficticious CHANGELOG
## Some Old version
- added some features
- spent a lot of time trying to figure out releases (if only there was a tool to help with that)
`);
updateChangelog(
`## v1.0.0
- added release-plan (how did I live without it!?)
- releasing initial working version`,
new Map([['thing', { newVersion: 'v1.0.0', impact: 'major' }]]) as any,
);
const [, newChangelog] = mocks.writeFileSync.mock.lastCall;
expect(newChangelog).to.eq(`# A Totally ficticious Changelog
## v1.0.0
thing v1.0.0 (major)
- added release-plan (how did I live without it!?)
- releasing initial working version
## Some Old version
- added some features
- spent a lot of time trying to figure out releases (if only there was a tool to help with that)
`);
});

Check failure on line 80 in src/prepare.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎`
});

0 comments on commit e406cdd

Please sign in to comment.