Add test for namespaced attributes

pull/180/head
Matt Kaemmerer 8 years ago
parent 12bd7dd770
commit 7399632795

@ -26,6 +26,11 @@ describe('attributes', function() {
assert.strictEqual(elm.getAttribute('minlength'), '0');
assert.strictEqual(elm.getAttribute('value'), 'false');
});
it('are set correctly when namespaced', function() {
var vnode1 = h('div', {attrs: {'xlink:href': '#foo'}});
elm = patch(vnode0, vnode1).elm;
assert.strictEqual(elm.getAttributeNS('http://www.w3.org/1999/xlink', 'href'), '#foo');
});
describe('boolean attribute', function() {
it('is present if the value is truthy', function() {
var vnode1 = h('div', {attrs: {required: true, readonly: 1, noresize: 'truthy'}});

Loading…
Cancel
Save