Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
6
test2/fromCamelCase/fromCamelCase.js
Normal file
6
test2/fromCamelCase/fromCamelCase.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const fromCamelCase = (str, separator = '_') =>
|
||||
str
|
||||
.replace(/([a-z\d])([A-Z])/g, '$1' + separator + '$2')
|
||||
.replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + separator + '$2')
|
||||
.toLowerCase();
|
||||
module.exports = fromCamelCase;
|
||||
Reference in New Issue
Block a user