From fb32970c660a235bfdb535c8bbf66f9d05c75b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Wed, 10 Jan 2018 12:24:30 +0100 Subject: [PATCH] add test for KebabCase and toEnglishDate EnglishDate is not working properly - #523 --- test/toEnglishDate/toEnglishDate.test.js | 1 + test/toKebabCase/toKebabCase.test.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/test/toEnglishDate/toEnglishDate.test.js b/test/toEnglishDate/toEnglishDate.test.js index a4c8d3e37..48bc3d9fc 100644 --- a/test/toEnglishDate/toEnglishDate.test.js +++ b/test/toEnglishDate/toEnglishDate.test.js @@ -5,6 +5,7 @@ test('Testing toEnglishDate', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof toEnglishDate === 'function', 'toEnglishDate is a Function'); + // t.equal(toEnglishDate('09/21/2010'), '21/09/2010', 'Converts a date from American format to English format'); //t.deepEqual(toEnglishDate(args..), 'Expected'); //t.equal(toEnglishDate(args..), 'Expected'); //t.false(toEnglishDate(args..), 'Expected'); diff --git a/test/toKebabCase/toKebabCase.test.js b/test/toKebabCase/toKebabCase.test.js index 28d87d374..01bd40b2c 100644 --- a/test/toKebabCase/toKebabCase.test.js +++ b/test/toKebabCase/toKebabCase.test.js @@ -5,6 +5,10 @@ test('Testing toKebabCase', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof toKebabCase === 'function', 'toKebabCase is a Function'); + t.equal(toKebabCase('camelCase'), 'camel-case', "string converts to snake case"); + t.equal(toKebabCase('some text'), 'some-text', "string converts to snake case"); + t.equal(toKebabCase('some-mixed-string With spaces-underscores-and-hyphens'), 'some-mixed-string-with-spaces-underscores-and-hyphens', "string converts to snake case"); + t.equal(toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'), 'i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html', "string converts to snake case"); //t.deepEqual(toKebabCase(args..), 'Expected'); //t.equal(toKebabCase(args..), 'Expected'); //t.false(toKebabCase(args..), 'Expected');