import htmlToJSX from './htmlToJSX';
describe('htmlToJSX', () => {
describe('html attributes', function() {
test('class should be repleaced with className', function() {
expect(htmlToJSX('
')).toEqual('');
});
test('for should be repleaced with htmlFor', function() {
expect(htmlToJSX('')).toEqual('');
});
test('attributes should be camelCased', function() {
expect(htmlToJSX('')).toEqual(
'',
);
});
});
describe('html tags', function() {
test('should have root element', function() {
expect(htmlToJSX('')).toEqual(
'',
);
});
test('should have backslash', function() {
expect(htmlToJSX('')).toEqual(
'',
);
});
test('close tag', () => {
expect(htmlToJSX(``)).toEqual(``);
});
test('close tag', () => {
expect(htmlToJSX(``)).toEqual(``);
});
test('style tag', () => {
expect(htmlToJSX(``)).toEqual(
"",
);
});
});
describe('comments', function() {
test('should be replaced to jsx comment', function() {
expect(htmlToJSX('')).toEqual('{/* this is a comment */}');
});
});
describe('inline-style', function() {
test('should be repleaced with js object', function() {
expect(htmlToJSX('')).toEqual(
"",
);
});
});
});