Cleanup polling of merge request widget in tests

This commit is contained in:
Winnie Hellmann 2018-09-25 15:49:05 +02:00
parent cb0f024cd4
commit f183dba7c7
2 changed files with 6 additions and 0 deletions

View File

@ -114,6 +114,8 @@ export default {
},
beforeDestroy() {
eventHub.$off('mr.discussion.updated', this.checkStatus);
this.pollingInterval.destroy();
this.deploymentsInterval.destroy();
},
methods: {
createService(store) {

View File

@ -27,6 +27,10 @@ describe('mrWidgetOptions', () => {
});
});
afterEach(() => {
vm.$destroy();
});
describe('data', () => {
it('should instantiate Store and Service', () => {
expect(vm.mr).toBeDefined();