From 0b084833a32680cc1ae4e0e57bfea596ed433d6f Mon Sep 17 00:00:00 2001 From: Avior Date: Sun, 11 Apr 2021 01:37:35 +0200 Subject: [PATCH] Added addional tests Signed-off-by: Avior --- .gitattributes | 3 +- README.md | 32 +++++++++++++++++++- packages/object-util/__tests__/index.test.ts | 15 +++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index bb15c53..6313b56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -# Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=lf diff --git a/README.md b/README.md index f22d19e..60072cd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ # Libs -Multi Packages repo containing libraries used through our websites +Collection of libraries for differents usages + +## Libraries + +### DOM Manager + +Library to manage the browser DOM easier + +### Easy Sitemap + +Sitemap Builder + +### Listener + +Custom implementation of the NodeJS Listener + +### Logger + +A nicer `console` with support for theming and prefixes + +### Object Util + +Functions that make it easier to manipulate objects + +### Queue + +A `async` Queue system to do heavy work quicker + +### URL Manager + +A complete URL parser/serializer diff --git a/packages/object-util/__tests__/index.test.ts b/packages/object-util/__tests__/index.test.ts index 4bd5539..9779df2 100644 --- a/packages/object-util/__tests__/index.test.ts +++ b/packages/object-util/__tests__/index.test.ts @@ -96,6 +96,21 @@ describe('Object sort Tests', () => { d: 'fourth' }) }) + it('should sort by the specified key', () => { + const obj = { + b: 'first', + a: 'second', + c: 'zero', + d: 'fourth' + } + // @ts-expect-error + expect(objectSort(obj, ['c', 'a', 'e'])).toEqual({ + c: 'zero', + a: 'second', + b: 'first', + d: 'fourth' + }) + }) }) describe('Object Clone Tests', () => {