Fakultas Ilmu Komputer UI

Commit 1d37df34 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

[Refactor] Remove feetchmock restore on vacancylist test

parent c885b3df
......@@ -27,7 +27,6 @@ describe('VacancyList', () => {
const vacancyList = ReactTestUtils.renderIntoDocument(
<VacancyList userId={1} url="test" />);
expect(vacancyList).to.exist;
fetchMock.restore();
});
it('renders without problem for company', () => {
......@@ -36,7 +35,6 @@ describe('VacancyList', () => {
<VacancyList type="company" userId={1} url="test" />);
vacancyList.state.vacancies = response;
expect(vacancyList.generateVacancies()).to.exist;
fetchMock.restore();
});
it('update bookmarks without problem', () => {
......@@ -45,7 +43,6 @@ describe('VacancyList', () => {
<VacancyList userId={1} url="test" />);
vacancyList.updateBookmarkList();
expect(JSON.stringify(vacancyList.state.bookmarkList)).to.be.defined;
fetchMock.restore();
});
it('renders marked bookmarked vacancies without problem', () => {
......@@ -55,7 +52,6 @@ describe('VacancyList', () => {
vacancyList.state.vacancies = response;
vacancyList.state.bookmarkList = [{ id: 5 }, { id: 3 }, { id: 1 }];
expect(vacancyList.generateVacancies()).to.exist;
fetchMock.restore();
});
it('renders not marked vacancies without problem', () => {
......@@ -65,7 +61,6 @@ describe('VacancyList', () => {
vacancyList.state.vacancies = response;
vacancyList.state.bookmarkList = [{ id: 6 }, { id: 4 }, { id: 2 }];
expect(vacancyList.generateVacancies()).to.exist;
fetchMock.restore();
});
it('success calling API', () => {
......@@ -74,7 +69,6 @@ describe('VacancyList', () => {
<VacancyList userId={1} url="test" />);
vacancyList.state.vacancies = response;
expect(JSON.stringify(vacancyList.state.vacancies)).to.equal(JSON.stringify(response));
fetchMock.restore();
});
});
Supports Markdown
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