Skip to content

Commit

Permalink
Remove unnecessary afterEach hook
Browse files Browse the repository at this point in the history
new requireStubs object is created for each test
  • Loading branch information
lo1tuma committed May 23, 2017
1 parent c73a246 commit bdbca80
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/unit/lib/cliSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('CLI', function () {
beforeEach(function () {
requireStubs['/foo/package.json']['pr-log'] = { validLabels: { foo: 'Foo', bar: 'Bar' } };
});

it('should use custom labels if they are provided in package.json', function () {
const expectedGithubRepo = 'foo/bar';
createChangelog.returns('generated changelog');
Expand All @@ -81,11 +82,6 @@ describe('CLI', function () {
expect(prependFile).to.have.been.calledWith('/foo/CHANGELOG.md', 'generated changelog');
});
});
afterEach(function () {
delete requireStubs['/foo/package.json']['pr-log']; // eslint-disable-line
// preferred, but not defined on TravisCI
// Reflect.deleteProperty(requireStubs['/foo/package.json'], 'pr-log');
});
});

it('should report the generated changelog', function () {
Expand Down

0 comments on commit bdbca80

Please sign in to comment.