Test cleanup and fixes [a-b]
This commit is contained in:
@ -9,7 +9,9 @@ const toSnakeCase = require('./toSnakeCase.js');
|
||||
t.equal(toSnakeCase('some text'), 'some_text', "toSnakeCase('some text') returns some_text");
|
||||
t.equal(toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens'), 'some_mixed_string_with_spaces_underscores_and_hyphens', "toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens");
|
||||
t.equal(toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'), 'i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html', "toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html");
|
||||
t.equal(toSnakeCase(), undefined, 'toSnakeCase() returns undefined');
|
||||
test('toSnakeCase() returns undefined', () => {
|
||||
expect(toSnakeCase(), undefined).toBe()
|
||||
});
|
||||
t.throws(() => toSnakeCase([]), 'toSnakeCase([]) throws an error');
|
||||
t.throws(() => toSnakeCase({}), 'toSnakeCase({}) throws an error');
|
||||
t.throws(() => toSnakeCase(123), 'toSnakeCase(123) throws an error');
|
||||
|
||||
Reference in New Issue
Block a user