-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from we3x/feature/testing
Clear test
- Loading branch information
Showing
50 changed files
with
515 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
/* eslint no-undef: 0 */ | ||
/* eslint no-unused-expressions: 0 */ | ||
/* eslint no-sequences: 0 */ | ||
import expect from 'expect'; | ||
import actions from '../actions'; | ||
import store from '../../../store'; | ||
import { LOGIN } from '../constants'; | ||
|
||
const loginTest = describe('Testing login', () => { | ||
it('get pending state', () => { | ||
expect(store.dispatch(actions.begin())) | ||
it('get pending state', () => { | ||
expect(store.dispatch(actions.begin())) | ||
.toEqual({ | ||
payload: { | ||
status: 'pending', | ||
}, | ||
type: LOGIN, | ||
}); | ||
}), | ||
it('get error state', () => { | ||
expect(store.dispatch(actions.fail({ message: 'ErorR'}))) | ||
.toEqual({ | ||
payload: { | ||
status: 'error', | ||
error: 'ErorR', | ||
}, | ||
type: LOGIN, | ||
}); | ||
}); | ||
it('get error state', () => { | ||
expect(store.dispatch(actions.fail({ message: 'ErorR' }))) | ||
.toEqual({ | ||
payload: { | ||
status: 'error', | ||
error: 'ErorR', | ||
}, | ||
type: LOGIN, | ||
}); | ||
}); | ||
}); | ||
|
||
export default loginTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.