Skip to content

Commit

Permalink
Test combining tag class with class prop
Browse files Browse the repository at this point in the history
  • Loading branch information
wrnrlr committed Nov 20, 2024
1 parent c753cb7 commit b70b2cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/hyperscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ testing('h with basic element', {skip:true}, async test => {
await test('tag with id', () => assertHTML(h('#a'), '<div id="a"></div>'))
await test('tag with class', () => assertHTML(h('.a'), '<div class="a"></div>'))
await test('tag with id & classes', () => assertHTML(h('i#a.b.c'), '<i id="a" class="b c"></i>'))
await test('tag with tag class and prop class', () => assertHTML(h('hr.a', {class:'b'}), '<hr class="a b">'))
await test('tag with tag class and dynamic prop class', () => assertHTML(h('hr.a', {class:()=>'b'}), '<hr class="a b">'))
await test('tag with tag class and undeefined prop class', () => assertHTML(h('hr.a', {class:undefined}), '<hr class="a">'))
await test('tag with tag class and dynamic undeefined prop class', () => assertHTML(h('hr.a', {class:()=>undefined}), '<hr class="a">'))
await test('no props or children', () => assertHTML(h('hr'), '<hr>'))
await test('boolean content', () => assertHTML(h('b',true), '<b>true</b>'))
await test('string content', () => assertHTML(h('b','A'), '<b>A</b>'))
Expand Down

0 comments on commit b70b2cf

Please sign in to comment.