Skip to content

Commit

Permalink
fix(attibutes): Fix small template issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Apr 19, 2017
1 parent ae94144 commit a65dd48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/jsx/attributes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ declare namespace JSX {
capture?: boolean;
cellPadding?: number | string;
cellSpacing?: number | string;
charSet?: string;
charset?: string;
challenge?: string;
checked?: boolean;
classID?: string;
className?: string;
class?: string;
cols?: number;
colSpan?: number;
content?: string;
Expand Down
5 changes: 4 additions & 1 deletion test/html-fragments.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import * as elements from '../src/elements';
import { expect } from 'chai';
const logger = require('html-differ/lib/logger');
Expand All @@ -20,13 +21,15 @@ describe('Simple html structures', () => {
testEqual(`<ul>
<li>1</li>
<li>2</li>
</ul>`, () => <ul><li>1</li><li>2</li></ul>);
</ul>`, () => <ul>{[1, 2].map(li => <li>{li}</li>)}</ul>);
testEqual('<button on-click="doSomething"></button>', () => <button onClick={doSomething}></button>);
testEqual('<div class="class-a"></div>', () => <div class="class-a"></div>);
});

describe('Self-closing html tags', () => {
testEqual('<area>', () => <area></area>);
testEqual('<hr>', () => <hr></hr>);
testEqual('<hr>content</hr>', () => <hr>content</hr>);
testEqual('<meta charset="utf8">', () => <meta charset="utf8"></meta>);
});

0 comments on commit a65dd48

Please sign in to comment.