Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd702155

Browse files
committed
tests: renameexpect toexpectState
better expresses what the test helper does
1 parentd06bc00 commitd702155

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎test.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('should transition between states', t => {
5555
letprevState=undefined
5656
conststore=createStore(fetchUsersReducer,state)
5757

58-
constexpect=(expected,maybeMessage)=>t.deepEquals(state,expected,maybeMessage)
58+
constexpectState=(expected,maybeMessage)=>t.deepEquals(state,expected,maybeMessage)
5959

6060
constaction=(type,payload)=>{
6161
prevState=state
@@ -64,36 +64,36 @@ test('should transition between states', t => {
6464
}
6565

6666
action('DUMMY')
67-
expect({
67+
expectState({
6868
status:'INIT',
6969
},'Should set initial status to "INIT"')
7070

7171
action('FETCH_USERS_RESPONSE',{users})
72-
expect(prevState,'Should ignore messages when not handled by current status')
72+
expectState(prevState,'Should ignore messages when not handled by current status')
7373

7474
action('FETCH_USERS')
75-
expect({
75+
expectState({
7676
error:null,
7777
status:'IN_PROGRESS'
7878
})
7979

8080
action('FETCH_USERS_FAIL','timeout')
81-
expect({
81+
expectState({
8282
error:'timeout',
8383
status:'INIT'
8484
})
8585

8686
action('FETCH_USERS')
87-
expect({
87+
expectState({
8888
error:null,
8989
status:'IN_PROGRESS'
9090
})
9191

9292
action('FETCH_USERS')
93-
expect(prevState)
93+
expectState(prevState)
9494

9595
action('FETCH_USERS_RESPONSE',{users})
96-
expect({
96+
expectState({
9797
error:null,
9898
status:'INIT',
9999
users

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp