<commit_before>
var test = require('tape')
var h    = require('../')
var o    = require('observable')
var spy  = require('ispy')
var simu = require('simulate')

test('simple', function (t) {
  t.equal(h('h1').outerHTML, '<h1></h1>')
  t.equal(h('h1', 'hello world').outerHTML, '<h1>hello world</h1>')
  t.end()
})

test('nested', function(t) {
  t.equal(h('div',
    h('h1', 'Title'),
    h('p', 'Paragraph')
  ).outerHTML, '<div><h1>Title</h1><p>Paragraph</p></div>')
  t.end()
})

test('arrays for nesting is ok', function(t){
  t.equal(h('div',
    [h('h1', 'Title'), h('p', 'Paragraph')]
  ).outerHTML, '<div><h1>Title</h1><p>Paragraph</p></div>')
  t.end()
})

test('can use id selector', function(t){
  t.equal(h('div#frame').outerHTML, '<div id="frame"></div>')
  t.end()
})

test('can use class selector', function(t){
  t.equal(h('div.panel').outerHTML, '<div class="panel"></div>')
  t.end()
})

test('can set properties', function(t){
  var a = h('a', {href: 'http://google.com'})
  t.equal(a.href, 'http://google.com/')
  var checkbox = h('input', {name: 'yes', type: 'checkbox'})
  t.equal(checkbox.outerHTML, '<input name="yes" type="checkbox">')<commit_msg>add test for default tag name<commit_after>
var test = require('tape')
var h    = require('../')
var o    = require('observable')
var spy  = require('ispy')
var simu = require('simulate')

test('simple', function (t) {
  t.equal(h('h1').outerHTML, '<h1></h1>')
  t.equal(h('h1', 'hello world').outerHTML, '<h1>hello world</h1>')
  t.end()
})

test('nested', function(t) {
  t.equal(h('div',
    h('h1', 'Title'),
    h('p', 'Paragraph')
  ).outerHTML, '<div><h1>Title</h1><p>Paragraph</p></div>')
  t.end()
})

test('arrays for nesting is ok', function(t){
  t.equal(h('div',
    [h('h1', 'Title'), h('p', 'Paragraph')]
  ).outerHTML, '<div><h1>Title</h1><p>Paragraph</p></div>')
  t.end()
})

test('can use id selector', function(t){
  t.equal(h('div#frame').outerHTML, '<div id="frame"></div>')
  t.end()
})

test('can use class selector', function(t){
  t.equal(h('div.panel').outerHTML, '<div class="panel"></div>')
  t.end()
})

test('can default element types', function(t){
  t.equal(h('.panel').outerHTML, '<div class="panel"></div>')
  t.equal(h('#frame').outerHTML, '<div id="frame"></div>')
  t.end()
})

test('can set properties', function(t){
  var a = h('a', {href: 'http://google.com'})
  t.equal(a.href, 'http://google.com/')
  var checkbox = h('input', {name: 'yes', type: 'checkbox'})
  t.equal(checkbox.outerHTML, '<input name="yes" type="checkbox">')
{'fraction_non_alphanumeric': 0.2690794649881983, 'fraction_numerical': 0.00944138473642801, 'mean_word_length': 4.7274774774774775, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6222046', 'n_tokens_mistral': 1005, 'n_tokens_neox': 998, 'n_words': 198}