lux-framework
Version:
Build scalable, Node.js-powered REST APIs with almost no code.
20 lines (15 loc) • 511 B
JavaScript
// @flow
import { expect } from 'chai';
import { it, describe } from 'mocha';
import underscore from '../underscore';
describe('util underscore()', () => {
it('converts ClassName to class_name', () => {
expect(underscore('ClassName')).to.equal('class_name');
});
it('converts camelCase to camel_case', () => {
expect(underscore('camelCase')).to.equal('camel_case');
});
it('converts kebab-case to kebab_case', () => {
expect(underscore('kebab-case')).to.equal('kebab_case');
});
});