Skip to content

Commit 4028b18

Browse files
andrej-urvantsevyyx990803
authored andcommitted
#192 Fix testing example in the documentation (#195)
1 parent 043b31d commit 4028b18

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

docs/en/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const testAction = (action, args, state, expectedMutations, done) => {
102102
action({dispatch, state}, ...args)
103103

104104
// check if no mutations should have been dispatched
105-
if (count === 0) {
106-
expect(expectedMutations.length).to.equal(0)
105+
if (expectedMutations.length === 0) {
106+
expect(count).to.equal(0)
107107
done()
108108
}
109109
}

docs/es/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const testAction = (action, args, state, expectedMutations, done) => {
102102
action({dispatch, state}, ...args)
103103

104104
// comprobar si no deberían haber sido despachadas mutaciones
105-
if (count === 0) {
106-
expect(expectedMutations.length).to.equal(0)
105+
if (expectedMutations.length === 0) {
106+
expect(count).to.equal(0)
107107
done()
108108
}
109109
}

docs/it/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ const testAction = (action, args, state, expectedMutations, done) => {
100100
}
101101
action({dispatch, state}, ...args)
102102

103-
if (count === 0) {
104-
expect(expectedMutations.length).to.equal(0)
103+
if (expectedMutations.length === 0) {
104+
expect(count).to.equal(0)
105105
done()
106106
}
107107
}

docs/pt/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const testAction = (action, args, state, expectedMutations, done) => {
102102
action({dispatch, state}, ...args)
103103

104104
// check if no mutations should have been dispatched
105-
if (count === 0) {
106-
expect(expectedMutations.length).to.equal(0)
105+
if (expectedMutations.length === 0) {
106+
expect(count).to.equal(0)
107107
done()
108108
}
109109
}

docs/zh-cn/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ const testAction = (action, args, state, expectedMutations, done) => {
9696
action({dispatch, state}, ...args)
9797

9898
// 检查是否没有 mutation 被 dispatch
99-
if (count === 0) {
100-
expect(expectedMutations.length).to.equal(0)
99+
if (expectedMutations.length === 0) {
100+
expect(count).to.equal(0)
101101
done()
102102
}
103103
}

0 commit comments

Comments
 (0)