Test: describe in all test files #144

Merged
jakob.scheid merged 4 commits from testing/describe-in-all-files into main 2026-07-28 21:44:17 +02:00
Showing only changes of commit 7ee9c45339 - Show all commits
+5 -3
View File
@@ -14,10 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { expect, test } from 'vitest';
import { describe, expect, test } from 'vitest';
import { ensureUnit } from '../cssDimensions';
test.for([
describe('cssDimensions', () => {
test.for([
{ dimension: null, expected: '0px' },
{ dimension: undefined, expected: '0px' },
@@ -117,6 +118,7 @@ test.for([
{ dimension: 'max(42px,5rem)', expected: 'max(42px,5rem)' },
{ dimension: 'clamp(42vh,23vw,13cap)', expected: 'clamp(42vh,23vw,13cap)' },
{ dimension: 'clamp( 42vh,23vw,13cap )', expected: 'clamp( 42vh,23vw,13cap )' }
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
expect(ensureUnit(dimension)).toBe(expected);
});
});