From a483c61c08d7d65cd9b8fd14516577a0a428523f Mon Sep 17 00:00:00 2001 From: Jordan Welch Date: Tue, 17 Sep 2024 16:31:41 -0500 Subject: [PATCH] Add explanation of dataset name interpolation --- datasets.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datasets.md b/datasets.md index ee3118d..cd57e60 100644 --- a/datasets.md +++ b/datasets.md @@ -47,6 +47,14 @@ If a key is added, Pest will use the key when generating the description for the +If the test name includes `:dataset`, the description will be interpolated into the test name at that location. + +```bash + PASS Tests\Feature\ValidationTest + ✓ it validates the "first_name" field + ✓ it validates the "email" field +``` + It is important to notice that when using `closures` in your dataset, you must declare the arguments type in the closure passed to the test function. ```php