Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
feat(#104): finished selector test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Gasser committed Apr 17, 2019
1 parent 9d500bb commit 1ab48ae
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/redux/faces/__tests__/selector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const initialState = {
};

describe('faces selector test suite', () => {
it('should return empty object for null state', () => {
expect(selectors.facesStateSelector({}))
.toEqual({});
});

it('should return facesState state', () => {
expect(selectors.facesStateSelector(initialState))
.toEqual(initialState.faces);
Expand Down
5 changes: 5 additions & 0 deletions src/redux/images/__tests__/selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const initialState = {
};

describe('images selector test suite', () => {
it('should return empty object for null state', () => {
expect(selectors.imagesStateSelector({}))
.toEqual({});
});

it('should handle imagesStateSelector', () => {
expect(selectors.imagesStateSelector(initialState))
.toEqual(initialState.images);
Expand Down
5 changes: 5 additions & 0 deletions src/redux/labels/__tests__/selector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const initialState = {
};

describe('labels selector test suite', () => {
it('should return empty object for null state', () => {
expect(selectors.labelsStateSelector({}))
.toEqual({});
});

it('should return labelsState state', () => {
expect(selectors.labelsStateSelector(initialState))
.toEqual(initialState.labels);
Expand Down
5 changes: 5 additions & 0 deletions src/redux/user/__tests__/selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ describe('user selector test suite', () => {
}
};

it('should return empty object for null state', () => {
expect(selectors.__testables__.userStateSelector({}))
.toEqual({});
});

it('should handle userStateSelector', () => {
expect(selectors.__testables__.userStateSelector(initialState))
.toEqual(initialState.user);
Expand Down

0 comments on commit 1ab48ae

Please sign in to comment.