Can't run effectful tests
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- testing
调研方向
Read the Test/QuickCheck.purs definition linked in the issue, especially the Gen-based property API. The report asks to support testing effectful functions without unsafePerformEffect; use the Blockly code2blockly then blockly2code round trip as the example. Done means an effectful property can express that round trip and verify the original code is returned.
由索引模型根据 Issue 内容生成。
描述
I have a case that I think is quite legitimate where I want to quickcheck an effectful function however I can't because https://github.com/purescript/purescript-quickcheck/blob/v5.0.0/src/Test/QuickCheck.purs#L97 uses the concrete Gen monad.
My usecase is testing Blockly code2blockly and blockly2code functions. Since Blockly is a very mutable javascript library, both code2blockly and blockly2code have Effect types. In order to test my implementation of these functions I can take some code and basically run code2blockly followed by blockly2code and I should get the original code back. Currently I'm doing this with unsafePerformEffect 😱 but since tests are actually Effects I don't think this is really necessary.
- 主要语言
- PureScript
- 星标
- 108
- 派生
- 42
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purescript/purescript-quickcheck 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
purescript/purescript-quickcheck#136 · 1 条评论 ·
-
Lazy List Arbitrary Instance可能已有人在做 @eviefp 于 2207 天前认领。 未关闭type: enhancement
难度 3/5 1-2 天 新手友好度 20/100
purescript/purescript-quickcheck#111 · 2 条评论 · 2 个 reaction ·
-
type: documentation
难度 1/5 1 小时以内 新手友好度 55/100
-
purs-0.15 type: breaking change
难度 5/5 一周以上 新手友好度 20/100
purescript/purescript-quickcheck#104 · 12 条评论 ·
-
Shrinking未关闭type: enhancement
难度 5/5 一周以上 新手友好度 15/100
purescript/purescript-quickcheck#103 · 6 条评论 · 4 个 reaction ·
查看 purescript/purescript-quickcheck 的全部 Issue
相似的 Issue
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesized未关闭
难度 2/5 1-3 小时 新手友好度 78/100
jest-community/eslint-plugin-jest#2052 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
johanhaleby/occurrent#1505 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
future-agi/future-agi#4092 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复