avajs/ava

Diffs for arrays of strings can be pretty confusing

オープン

#1,521 opened on 2017/09/16

 (3 件のコメント) (1 件のリアクション) (0 人の担当者)JavaScript (1,408 件のフォーク)batch import
bughelp wantedscope:assertionsscope:reporters

Repository metrics

Stars
 (20,600 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

If you do t.deepEqual (and I think also t.is) on two arrays containing strings. If there are a large amount of strings and they only differ slightly the output is very confusing. It appears that as soon as a new entry in an array has shifted the items after it across, AVA text diffs every single entry against the same index in the original array.

e.g: An array with 219 strings that has had 6 additions and 1 deletion: AVA diff: https://travis-ci.org/lukechilds/window/jobs/266859856 GitHub diff: https://github.com/lukechilds/window/pull/7/commits/6ecbade39561cf705ddc2833cbc3b93e2abfb223

コントリビューターガイド