Final fixes, all tests running

This commit is contained in:
Angelos Chalaris
2018-06-18 20:41:57 +03:00
parent 977adb1198
commit e9594e6355
49 changed files with 2189 additions and 1198 deletions

View File

@@ -4,29 +4,29 @@ const toCamelCase = require('./toCamelCase.js');
test('toCamelCase is a Function', () => {
expect(toCamelCase).toBeInstanceOf(Function);
});
test('toCamelCase('some_database_field_name') returns someDatabaseFieldName', () => {
test('toCamelCase(\'some_database_field_name\') returns someDatabaseFieldName', () => {
expect(toCamelCase('some_database_field_name')).toBe('someDatabaseFieldName');
});
test('toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized', () => {
test('toCamelCase(\'Some label that needs to be camelized\') returns someLabelThatNeedsToBeCamelized', () => {
expect(toCamelCase('Some label that needs to be camelized')).toBe('someLabelThatNeedsToBeCamelized');
});
test('toCamelCase('some-javascript-property') return someJavascriptProperty', () => {
test('toCamelCase(\'some-javascript-property\') return someJavascriptProperty', () => {
expect(toCamelCase('some-javascript-property')).toBe('someJavascriptProperty');
});
test('toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens', () => {
test('toCamelCase(\'some-mixed_string with spaces_underscores-and-hyphens\') returns someMixedStringWithSpacesUnderscoresAndHyphens', () => {
expect(toCamelCase('some-mixed_string with spaces_underscores-and-hyphens')).toBe('someMixedStringWithSpacesUnderscoresAndHyphens');
});
test('toCamelCase() throws a error', () => {
expect(toCamelCase()).toThrow();
expect(() => {toCamelCase(); }).toThrow();
});
test('toCamelCase([]) throws a error', () => {
expect(toCamelCase([])).toThrow();
expect(() => {toCamelCase([]); }).toThrow();
});
test('toCamelCase({}) throws a error', () => {
expect(toCamelCase({})).toThrow();
expect(() => {toCamelCase({}); }).toThrow();
});
test('toCamelCase(123) throws a error', () => {
expect(toCamelCase(123)).toThrow();
expect(() => {toCamelCase(123); }).toThrow();
});
let start = new Date().getTime();
toCamelCase('some-mixed_string with spaces_underscores-and-hyphens');