fluent API for snapshotting only specific subsets of a snapshot
- 主要言語
- Kotlin
- スター
- 101
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
It would be nice to be able to truncate a snapshot to only certain specific lines. Something like:
```java
expectSelfie(blah).lines(1).toBe_TODO() // first line
expectSelfie(blah).lines(2).toBe_TODO() // first two lines
expectSelfie(blah).lines(-2).toBe_TODO() // last two lines
expectSelfie(blah).lines(-1).toBe_TODO() // last one line
var snapshot = expectSelfie(blah)
snapshot.lines(2).toBe_TODO() // first two lines
snapshot.lines(-2).toBe_TODO() // last two lines
```
I have also sometimes wanted to match a certain regex, like maybe
```
expectSelfie(blah).withinRegex("(?m)^.*$\n?^.*$").toBe_TODO()
```
So far, each time that I have wanted this, I have found a better way to solve this by filtering before the snapshot gets taken...
コントリビューションガイド
調査の方向性
まず既存の expectSelfie API と、スナップショットの値がどのように照合されるかを調査します。行の選択と regex マッチングが引き続き必要かどうかを明確にし、それらのセマンティクスを定義して、実装箇所とテスト箇所を特定する前に Fluent API について合意します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kotlin
- 領域
- testing
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100