Bloblang Tests
Sometimes when working with large Bloblang mappings it’s preferred to have the full mapping in a separate
file to your Wombat configuration. In this case it’s possible to write unit tests that target and execute the mapping
directly with the field target_mapping
, which when specified is interpreted as either an absolute path or a path
relative to the test definition file that points to a file containing only a Bloblang mapping.
For example, if we were to have a file cities.blobl
containing a mapping:
We can accompany it with a test file cities_test.yaml
containing a regular test definition:
And execute this test the same way we execute other Wombat tests (wombat test ./dir/cities_test.yaml
,
wombat test ./dir/...
, etc).