You can define 1 or more test functions in a single block. Each test function accepts a data object as an argument. Within the body of the function, you can write any type of test you want to validate the input data. After the block’s main code is executed, the output data is passed into each test function for validation. If any tests fail, then the block run will also fail.Documentation Index
Fetch the complete documentation index at: https://mage-staging.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Example
Here is an example of a transformer block with 2 tests:You can combine all your data validations into 1 test function or you can
split them up into multiple test functions. The benefit of splitting them up
is that they can run in parallel, speeding up the data validation.