This helper utility gives you tools to test real records and fields locally against your field hooks (default, cast, compute and validate) and record-level compute functions (recordCompute and batchRecordsCompute). This runs the exact same logic that is done on Flatfile's production servers so it will produce the same results locally for quick testing before deploying.
SheetTester®
This helper utility gives you tools to test real records and fields locally against your field hooks (
default
,cast
,compute
andvalidate
) and record-level compute functions (recordCompute
andbatchRecordsCompute
). This runs the exact same logic that is done on Flatfile's production servers so it will produce the same results locally for quick testing before deploying.For example, with this TestSheet:
transformField(fieldName: string, value: string)
This takes a field name and value and returns the transformed value based on all sheet operations:
testRecord(record: object)
This takes a full record and returns the transformed record based on all sheet operations:
testRecords(record: object[])
This takes an array of full records and returns the transformed records based on all sheet operations: