Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
11
test/fromCamelCase/fromCamelCase.test.js
Normal file
11
test/fromCamelCase/fromCamelCase.test.js
Normal file
@ -0,0 +1,11 @@
|
||||
const expect = require('expect');
|
||||
const fromCamelCase = require('./fromCamelCase.js');
|
||||
|
||||
|
||||
test('fromCamelCase is a Function', () => {
|
||||
expect(fromCamelCase).toBeInstanceOf(Function);
|
||||
});
|
||||
t.equal(fromCamelCase('someDatabaseFieldName', ' '), 'some database field name', "Converts a string from camelcase");
|
||||
t.equal(fromCamelCase('someLabelThatNeedsToBeCamelized', '-'), 'some-label-that-needs-to-be-camelized', "Converts a string from camelcase");
|
||||
t.equal(fromCamelCase('someJavascriptProperty', '_'), 'some_javascript_property', "Converts a string from camelcase");
|
||||
|
||||
Reference in New Issue
Block a user