Skip to content

Commit

Permalink
better tests + readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maphel committed Sep 3, 2023
1 parent d73c650 commit 0844bb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/classnames/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 0844bb6

Please sign in to comment.