mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Fancier compare
This commit is contained in:
parent
9a58ab1000
commit
4bb5272b77
@ -24,7 +24,7 @@ compare_files() {
|
||||
pattern="$3"
|
||||
|
||||
if [ "$DEBUG" = "true" ]; then get_for_file "${expected}" >&2; fi
|
||||
diff --side-by-side --suppress-common-lines \
|
||||
diff --side-by-side \
|
||||
<(jq "${pattern}" -S <(get_for_file "${expected}")) \
|
||||
<(jq "${pattern}" -S <(get_for_file "${actual}"))
|
||||
}
|
||||
@ -33,4 +33,6 @@ echo
|
||||
echo "data"
|
||||
compare_files support/json_document-ams.json support/json_document-jsonapi_rb.json ".data"
|
||||
echo "included"
|
||||
compare_files support/json_document-ams.json support/json_document-jsonapi_rb.json ".included"
|
||||
# compare_files support/json_document-ams.json support/json_document-jsonapi_rb.json ".included | .[] | select(.type == \"posts\")"
|
||||
# compare_files support/json_document-ams.json support/json_document-jsonapi_rb.json ".included | .[] | select(.type == \"comments\")"
|
||||
compare_files support/json_document-ams.json support/json_document-jsonapi_rb.json ".included | .[] | select(.type != \"comments\", .type != \"posts\")"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user