From a3c1a61b59e5a11e5988d5678b7ccb46a49200e4 Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Sun, 23 May 2021 22:17:35 +0200 Subject: [PATCH] updates tests Took 1 minute --- tests/Unit/Datasets.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/Unit/Datasets.php b/tests/Unit/Datasets.php index 88978e41..39070038 100644 --- a/tests/Unit/Datasets.php +++ b/tests/Unit/Datasets.php @@ -2,12 +2,22 @@ use Pest\Datasets; -it('show the names of named datasets in their description', function () { +it('show only the names of named datasets in their description', function () { $descriptions = array_keys(Datasets::resolve('test description', [ 'one' => [1], 'two' => [[2]], ])); - expect($descriptions[0])->toBe('test description with data set "one" (1)'); - expect($descriptions[1])->toBe('test description with data set "two" (array(2))'); + expect($descriptions[0])->toBe('test description with data set "one"'); + expect($descriptions[1])->toBe('test description with data set "two"'); +}); + +it('show the actual dataset of non-named datasets in their description', function () { + $descriptions = array_keys(Datasets::resolve('test description', [ + [1], + [[2]], + ])); + + expect($descriptions[0])->toBe('test description with (1)'); + expect($descriptions[1])->toBe('test description with (array(2))'); });