tweak test representation to remove 'end_json' from tests and insert in handlers to aid composability
This commit is contained in:
parent
6ca54ae3d7
commit
d0535dfe1c
2 changed files with 25 additions and 13 deletions
|
@ -134,4 +134,21 @@ valid_term_test_() ->
|
|||
[ {Title, ?_assertEqual(true, is_term(Term, []))} || {Title, _, Term, _} <- Data ].
|
||||
|
||||
|
||||
handle_event_test_() ->
|
||||
Data = jsx:empty_array()
|
||||
++ jsx:empty_object()
|
||||
++ jsx:literals()
|
||||
++ jsx:naked_literals()
|
||||
++ jsx:integers()
|
||||
++ jsx:naked_integers(),
|
||||
[
|
||||
{
|
||||
Title, ?_assertEqual(
|
||||
true,
|
||||
lists:foldl(fun handle_event/2, {#opts{}, []}, Events ++ [end_json])
|
||||
)
|
||||
} || {Title, _, _, Events} <- Data
|
||||
].
|
||||
|
||||
|
||||
-endif.
|
Loading…
Add table
Add a link
Reference in a new issue