Skip to content

Commit

Permalink
refactor: move jest hooks to top
Browse files Browse the repository at this point in the history
  • Loading branch information
adamweeks authored and lalli-flores committed Dec 4, 2019
1 parent 94e91da commit 9e4ca52
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/ActivitiesAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ describe('Activities Adapter Interface', () => {
activitiesAdapter = new ActivitiesAdapter();
});

afterEach(() => {
activitiesAdapter = null;
});

test('getActivity() returns an observable', () => {
expect(isObservable(activitiesAdapter.getActivity())).toBeTruthy();
});
Expand All @@ -22,8 +26,4 @@ describe('Activities Adapter Interface', () => {
}
);
});

afterEach(() => {
activitiesAdapter = null;
});
});
8 changes: 4 additions & 4 deletions src/MeetingsAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ describe('Meetings Adapter Interface', () => {
meetingsAdapter = new MeetingsAdapter();
});

afterEach(() => {
meetingsAdapter = null;
});

test('getMeeting() returns an observable', () => {
expect(isObservable(meetingsAdapter.getMeeting())).toBeTruthy();
});
Expand All @@ -26,8 +30,4 @@ describe('Meetings Adapter Interface', () => {
test('meetingControls property exists', () => {
expect(meetingsAdapter).toHaveProperty('meetingControls');
});

afterEach(() => {
meetingsAdapter = null;
});
});
8 changes: 4 additions & 4 deletions src/PeopleAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ describe('People Adapter Interface', () => {
peopleAdapter = new PeopleAdapter();
});

afterEach(() => {
peopleAdapter = null;
});

test('getPerson() returns an observable', () => {
expect(isObservable(peopleAdapter.getPerson())).toBeTruthy();
});
Expand All @@ -22,8 +26,4 @@ describe('People Adapter Interface', () => {
}
);
});

afterEach(() => {
peopleAdapter = null;
});
});
8 changes: 4 additions & 4 deletions src/RoomsAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ describe('Rooms Adapter Interface', () => {
roomsAdapter = new RoomsAdapter();
});

afterEach(() => {
roomsAdapter = null;
});

test('getRoom() returns an observable', () => {
expect(isObservable(roomsAdapter.getRoom())).toBeTruthy();
});
Expand Down Expand Up @@ -57,8 +61,4 @@ describe('Rooms Adapter Interface', () => {
// eslint-disable-next-line no-empty
} catch (error) {}
});

afterEach(() => {
roomsAdapter = null;
});
});
8 changes: 4 additions & 4 deletions src/WebexAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ describe('Webex Adapter Interface', () => {
webexAdapter = new WebexAdapter(datasource);
});

test('WebexAdapter stores the data source', () => {
expect(webexAdapter.datasource).toBe(datasource);
});

afterEach(() => {
webexAdapter = null;
});

test('WebexAdapter stores the data source', () => {
expect(webexAdapter.datasource).toBe(datasource);
});
});

0 comments on commit 9e4ca52

Please sign in to comment.