Function brane_shr::utilities::test_on_dsl_files_async
source · pub async fn test_on_dsl_files_async<F, R>(mode: &'static str, exec: F)
Expand description
Runs a given closure on all files in the tests
folder (see the constant defined in this function’s source file).
This function runs the searching and loading of files asynchronously, for server contexts.
§Generic arguments
F
: The function signature of the closure. It simply accepts the path and source text of a single file, and returns a future that represents the test code. If it should cause the test to fail, that future should panic.
§Arguments
mode
: The mode to run in. May either be ‘BraneScript’ or ‘Bakery’.exec
: The closure that runs code on every file in the appropriate language’s text.
§Panics
This function panics if the test failed (i.e., if the files could not be found or the closure panics).