add 2 tests for toSnakeCase & truthCheckCollection
This commit is contained in:
@ -5,6 +5,11 @@ test('Testing toSnakeCase', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof toSnakeCase === 'function', 'toSnakeCase is a Function');
|
||||
t.equal(toSnakeCase('camelCase'), 'camel_case', "string converts to snake case");
|
||||
t.equal(toSnakeCase('some text'), 'some_text', "string converts to snake case");
|
||||
t.equal(toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens'), 'some_mixed_string_with_spaces_underscores_and_hyphens', "string converts to snake case");
|
||||
t.equal(toSnakeCase('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(toSnakeCase(args..), 'Expected');
|
||||
//t.equal(toSnakeCase(args..), 'Expected');
|
||||
//t.false(toSnakeCase(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,7 @@ test('Testing truthCheckCollection', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof truthCheckCollection === 'function', 'truthCheckCollection is a Function');
|
||||
t.equal(truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex: 'male' }], 'sex'), true, "second argument is truthy on all elements of a collection");
|
||||
//t.deepEqual(truthCheckCollection(args..), 'Expected');
|
||||
//t.equal(truthCheckCollection(args..), 'Expected');
|
||||
//t.false(truthCheckCollection(args..), 'Expected');
|
||||
|
||||
Reference in New Issue
Block a user