From 73996327956ebe7581ee8e919d0847a4c8d2bfa4 Mon Sep 17 00:00:00 2001 From: Matt Kaemmerer Date: Mon, 17 Oct 2016 13:16:07 -0500 Subject: [PATCH] Add test for namespaced attributes --- test/attributes.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/attributes.js b/test/attributes.js index 1ab372c..532ac42 100644 --- a/test/attributes.js +++ b/test/attributes.js @@ -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'}});