浏览代码

docs: fix false negative when checking `payload: false` in `testAction` (#1425)

Co-authored-by: Robert Schäfer <roschaefer@users.noreply.github.com>
Robert Schäfer 5 年之前
父节点
当前提交
7da1f139ba
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      docs/guide/testing.md

+ 1 - 3
docs/guide/testing.md

@@ -97,9 +97,7 @@ const testAction = (action, payload, state, expectedMutations, done) => {
 
     try {
       expect(type).to.equal(mutation.type)
-      if (payload) {
-        expect(payload).to.deep.equal(mutation.payload)
-      }
+      expect(payload).to.deep.equal(mutation.payload)
     } catch (error) {
       done(error)
     }