         </p>
       '''
 
-  context 'without value', ->
+  context '4', ->
     it 'works', ->
       source = '''
         </input
           @type checkbox
           @checked
       '''
+      format = (nodes, options) ->
+        assert nodes.length is 1
+        assert nodes[0].type is 'empty element'
+        assert nodes[0].name is 'input'
+        assert nodes[0].attributes.length is 2
+        assert nodes[0].attributes[0].type is 'attribute'
+        assert nodes[0].attributes[0].name is 'type'
+        assert nodes[0].attributes[0].value is 'checkbox'
+        assert nodes[0].attributes[1].type is 'attribute'
+        assert nodes[0].attributes[1].name is 'checked'
+        assert nodes[0].attributes[1].value is undefined
+        assert nodes[0].children.length is 0
+        assert.deepEqual options, { format }
+      bHtml source, { format }
       assert bHtml(source) is '<input type="checkbox" checked />'
       assert bHtml(source, format: 'demo') is '''
         <input

        </p>
      '''

      source = '<p\n  @class ' # with trailing space
      assert bHtml(source) is '<p class=""></p>'
      assert bHtml(source, format: 'demo') is '''
        <p

          />
      '''

  context '5', ->
    it 'works', ->
      source = '''
        <p
          @data-foo
      '''
      format = (nodes, options) ->
        assert nodes.length is 1
        assert nodes[0].type is 'element'
        assert nodes[0].name is 'p'
        assert nodes[0].attributes.length is 1
        assert nodes[0].attributes[0].type is 'attribute'
        assert nodes[0].attributes[0].name is 'data-foo'
        assert nodes[0].attributes[0].value is undefined
        assert nodes[0].children.length is 0
        assert.deepEqual options, { format }
      bHtml source, { format }
      assert bHtml(source) is '<p data-foo></p>'
      assert bHtml(source, format: 'demo') is '''
        <p
