Commit 3daa298d authored by Dennis Tang's avatar Dennis Tang

eslint fixes

parent af3dd043
<script> <script>
import _ from 'underscore';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
......
...@@ -42,31 +42,28 @@ describe('GkeProjectIdDropdown', () => { ...@@ -42,31 +42,28 @@ describe('GkeProjectIdDropdown', () => {
expect(vm.toggleText).toBe(LABELS.LOADING); expect(vm.toggleText).toBe(LABELS.LOADING);
}); });
it('returns default toggle text', done => { it('returns default toggle text', done =>
return vm.$nextTick().then(() => { vm.$nextTick().then(() => {
vm.setItem(emptyProjectMock); vm.setItem(emptyProjectMock);
expect(vm.toggleText).toBe(LABELS.DEFAULT); expect(vm.toggleText).toBe(LABELS.DEFAULT);
done(); done();
}); }));
});
it('returns project name if project selected', done => { it('returns project name if project selected', done =>
return vm.$nextTick().then(() => { vm.$nextTick().then(() => {
expect(vm.toggleText).toBe(selectedProjectMock.name); expect(vm.toggleText).toBe(selectedProjectMock.name);
done(); done();
}); }));
});
it('returns empty toggle text', done => { it('returns empty toggle text', done =>
return vm.$nextTick().then(() => { vm.$nextTick().then(() => {
vm.$store.commit(SET_PROJECTS, []); vm.$store.commit(SET_PROJECTS, []);
vm.setItem(emptyProjectMock); vm.setItem(emptyProjectMock);
expect(vm.toggleText).toBe(LABELS.EMPTY); expect(vm.toggleText).toBe(LABELS.EMPTY);
done(); done();
}); }));
});
}); });
describe('selectItem', () => { describe('selectItem', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment