ice-lab / icestore

🌲 Simple and friendly state for React
MIT License
397 stars 35 forks source link

Add @ice/store Unit Test #84

Closed luhc228 closed 4 years ago

luhc228 commented 4 years ago

增加 @ice/store单元测试(基于 icestore 1.3.x 版本)

Utils

Basic API

luhc228 commented 4 years ago

已增加 codecov badge 至README.md

alvinhui commented 4 years ago

tests/plugins/ 文件夹的作用是?

alvinhui commented 4 years ago

实际的单测报告截图评论回复一下,看看当前的覆盖情况。

另外,需要把单测结果加入到 PR 流程中,类似于之前的 iceworks?

alvinhui commented 4 years ago

reviewed

luhc228 commented 4 years ago

当前的单元测试报告如下图: image

luhc228 commented 4 years ago

我在这个PR中已经更新了 codecov.yml

comment:
  layout: "reach, diff, flags, files"
  behavior: default
  require_changes: false
  require_base: no
  require_head: yes
  branches:
    - "master"

不过这里面的PR还没有出来。应该是这个 .yml 文件没有更新到 master 分支上。具体如下面的链接 ref: https://codecov.io/gh/ice-lab/icestore/settings/yaml image

alvinhui commented 4 years ago

index.spec.ts 的测试挺全面。

这里提两个问题:

举个例子。测试 effect state,当前的实现是编写了用例 "get model effects state"。

我们是否可以:

可以对比一下这个思路和当前的做法间有哪些优缺点。

alvinhui commented 4 years ago

第二轮 reviewed