Ghost/ghost/release-utils/test/changelog.test.js
Daniel Lockyer c4de1841d0 Fixed files remaining in root after changelog test
- we didn't clear up the files after we were done with them so they
  stuck around in the root folder
2020-08-11 16:34:35 +01:00

32 lines
827 B
JavaScript

require('./utils');
const fs = require('fs');
const path = require('path');
const {Changelog} = require('../lib');
describe('Changelog', function () {
it('can generate changelog.md', function () {
const changelogPath = path.join(process.cwd(), 'changelog.md');
const changelog = new Changelog({
changelogPath: changelogPath,
folder: process.cwd()
});
changelog
.write({
githubRepoPath: `https://github.com/TryGhost/Ghost-Utils`,
lastVersion: '@tryghost/release-utils@0.6.3'
})
.sort()
.clean();
try {
fs.unlinkSync(changelogPath);
fs.unlinkSync(changelogPath + '.bk');
} catch (err) {
should.not.exist(err);
}
});
});