pub(super) fn validate_unit_test(
test: &UnitTest,
target_id: &ObjectId,
get_columns: &dyn Fn(&ObjectId) -> Option<BTreeMap<String, ColumnType>>,
dependencies: &BTreeSet<ObjectId>,
) -> Result<(), TestValidationError>Expand description
Validate a unit test against the known types.
This function performs three validations:
- All dependencies of the target view are mocked
- Each mock’s columns match the actual schema of the mocked object
- The expected output columns match the target view’s output schema
§Arguments
test- The unit test to validatetarget_id- The ObjectId of the target viewget_columns- Lookup for the column schema of an object, sourced from types.lock (external) and the build artifact database (internal)dependencies- Dependencies of the target view from the project’s dependency graph