-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspec.js
More file actions
24 lines (21 loc) · 762 Bytes
/
Copy pathspec.js
File metadata and controls
24 lines (21 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var dom = require('./index');
var React = require('react');
var assert = require('chai').assert;
describe('wrapping dom components', function() {
Object.keys(React.DOM).forEach(function(k) {
describe(k, function() {
it('should create a valid react element', function() {
var el = dom(k)();
assert.isTrue(React.isValidElement(el));
});
it('should ignore props if not passed', function() {
var el = dom(k)('child a');
assert.deepEqual(el.props.children, 'child a');
});
it('should allow passing children as arguments instead of array', function() {
var el = dom(k)('child a', 'child b');
assert.deepEqual(el.props.children, ['child a', 'child b']);
});
});
});
});