avajs/ava

First parameter for "snapshot" assertion should be called "value" for consistency

Open

#2.931 aberto em 5 de jan. de 2022

Ver no GitHub
 (9 comments) (1 reaction) (0 assignees)JavaScript (1.408 forks)batch import
help wanted

Métricas do repositório

Stars
 (20.600 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Currently, it is called "expected": https://github.com/avajs/ava/blob/main/docs/03-assertions.md#snapshotexpected-message

However, that is inconsistent with other assertion APIs like "is" where parameters are named "value" and "expected": https://github.com/avajs/ava/blob/main/docs/03-assertions.md#isvalue-expected-message

In the case of "snapshot", the expected data is represented by the previously-captured snapshot and the test data (often called "actual") is what gets passed to the function via the first parameter.

Guia do colaborador