const { parse } = require('@test/test-target'); describe('attribute names are case-insensitive', function () { it('removeAttribute removes an attribute written in another case', function () { const div = parse('
').firstChild; div.removeAttribute('title'); div.toString().should.eql(''); div.hasAttribute('title').should.eql(false); }); it('removeAttribute accepts a name in another case', function () { const div = parse('').firstChild; div.getAttribute('title').should.eql('t'); div.removeAttribute('TITLE'); div.toString().should.eql(''); div.hasAttribute('title').should.eql(false); }); it('removeAttribute keeps id in sync for an uppercase ID attribute', function () { const div = parse('').firstChild; div.removeAttribute('id'); div.toString().should.eql(''); div.id.should.eql(''); }); it('removeAttribute("ID") clears id', function () { const div = parse('').firstChild; div.removeAttribute('ID'); div.toString().should.eql(''); div.id.should.eql(''); }); it('setAttribute updates id for an uppercase ID attribute', function () { const div = parse('').firstChild; div.setAttribute('id', 'b'); div.toString().should.eql(''); div.id.should.eql('b'); }); });