Files
30-seconds-of-code/test/toCamelCase/toCamelCase.test.js
Angelos Chalaris 9217979f80 Updated testing with proper indentation
Uses two spaces instead of hard tabs.
2018-01-24 17:53:36 +02:00

17 lines
1.0 KiB
JavaScript

const test = require('tape');
const toCamelCase = require('./toCamelCase.js');
test('Testing toCamelCase', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof toCamelCase === 'function', 'toCamelCase is a Function');
t.equal(toCamelCase('some_database_field_name'), 'someDatabaseFieldName', "Converts a string to camelCase");
t.equal(toCamelCase('Some label that needs to be camelized'), 'someLabelThatNeedsToBeCamelized', "Converts a string to camelCase");
t.equal(toCamelCase('some-javascript-property'), 'someJavascriptProperty', "Converts a string to camelCase");
t.equal(toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'), 'someMixedStringWithSpacesUnderscoresAndHyphens', "Converts a string to camelCase");
//t.deepEqual(toCamelCase(args..), 'Expected');
//t.equal(toCamelCase(args..), 'Expected');
//t.false(toCamelCase(args..), 'Expected');
//t.throws(toCamelCase(args..), 'Expected');
t.end();
});