From 0844bb66dbd2717dad5b5a052b2698e9d6882745 Mon Sep 17 00:00:00 2001 From: christophel Date: Mon, 4 Sep 2023 01:35:41 +0200 Subject: [PATCH] better tests + readme changes --- README.md | 3 +++ src/classnames/index.test.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a982e0a..c7ba04c 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,9 @@ console.log(conditionalResult); // Output: "base active" const arrayResult = classNames(['array-class1', 'array-class2']); console.log(arrayResult); // Output: "array-class1 array-class2" +// Exessive Usage +const exessiveResult = classNames('a', ['b', 'c'], {d: true}, ['e', {f: true}, ' g', 'h '], [' i ', [{' j': true}]], ' k', 'l ', ' m ') +console.log(exessiveResult); // Output: "a b c d e f g h i j k l m" ``` --- ## Contributing diff --git a/src/classnames/index.test.ts b/src/classnames/index.test.ts index 428344a..fb9642d 100644 --- a/src/classnames/index.test.ts +++ b/src/classnames/index.test.ts @@ -81,7 +81,7 @@ describe("classnames", () => { }); it('evaluate all features', () => { - expect(classNames('a', ['b', 'c'], {d: true}, ['e', {f: true}, ' g', 'h ', ' i ', {' j': true}], ' k', 'l ', ' m ')).toBe('a b c d e f g h i j k l m'); + expect(classNames('a', ['b', 'c'], {d: true}, ['e', {f: true}, ' g', 'h '], [' i ', [{' j': true}]], ' k', 'l ', ' m ')).toBe('a b c d e f g h i j k l m'); }); it('should return empty string for no arguments', () => {