Updated the test system
This commit is contained in:
17
test/fromCamelCase.test.js
Normal file
17
test/fromCamelCase.test.js
Normal file
@ -0,0 +1,17 @@
|
||||
const expect = require('expect');
|
||||
const {fromCamelCase} = require('./_30s.js');
|
||||
|
||||
test('fromCamelCase is a Function', () => {
|
||||
expect(fromCamelCase).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Converts a string from camelcase', () => {
|
||||
expect(fromCamelCase('someDatabaseFieldName', ' ')).toBe('some database field name');
|
||||
});
|
||||
test('Converts a string from camelcase', () => {
|
||||
expect(fromCamelCase('someLabelThatNeedsToBeCamelized', '-')).toBe(
|
||||
'some-label-that-needs-to-be-camelized'
|
||||
);
|
||||
});
|
||||
test('Converts a string from camelcase', () => {
|
||||
expect(fromCamelCase('someJavascriptProperty', '_')).toBe('some_javascript_property');
|
||||
});
|
||||
Reference in New Issue
Block a user