       values: key:'good'
       result:'some good value'
     }
-
+    {
+      desc: 'dangling key gets flushed at end()'
+      output:['some dangling {', '{k', 'ey']
+      values: key:'good'
+      result:'some dangling {{key'
+    }
   ]
     do (test) ->
-      describe test.desc, ->
-
-        it test.should ? shouldReplaceKeyWithValue, (done) ->
-
-          # create a through stream as a pass-through to pipe to our stream
-          input = through()
-
-          # create our stream with values provided by the test
-          stream = kevas values:test.values
-
-          # create a sink stream to collect all it receives into a string
-          output = strung()
-
-          # when all writes are finished then verify the results
-          output.on 'finish', ->
-            assert.equal output?.string, test.result
-            done() # tell Mocha the test is done
-
-          # send any errors to Mocha's callback
-          input.on  'error', done
-          stream.on 'error', done
-          output.on 'error', done
-
-          # pipe our test input to our stream and then to our output collector.
-          input.pipe(stream).pipe(output)
-
-          # asynchronously write chunks to the input stream
-          # allow for pause/resume with on-drain.
-          index = 0
-          ready = true
-          writeout = (error) ->
-            if error? then return done error
-            unless ready then return input.once('drain', writeout)
-            if index < test.output.length
-              ready = input.write test.output[index], 'utf8', writeout
-              index++
-            else
-              input.end()
-
-          writeout()
+      it test.desc + ' ' + (test.should ? shouldReplaceKeyWithValue), (done) ->
+
+        # create a through stream as a pass-through to pipe to our stream
+        input = through()
+
+        # create our stream with values provided by the test
+        stream = kevas values:test.values
+
+        # create a sink stream to collect all it receives into a string
+        output = strung()
+
+        # when all writes are finished then verify the results
+        output.on 'finish', ->
+          assert.equal output?.string, test.result
+          done() # tell Mocha the test is done
+
+        # send any errors to Mocha's callback
+        input.on  'error', done
+        stream.on 'error', done
+        output.on 'error', done
+
+        # pipe our test input to our stream and then to our output collector.
+        input.pipe(stream).pipe(output)
+
+        # asynchronously write chunks to the input stream
+        # allow for pause/resume with on-drain.
+        index = 0
+        ready = true
+        writeout = (error) ->
+          if error? then return done error
+          unless ready then return input.once('drain', writeout)
+          if index < test.output.length
+            ready = input.write test.output[index], 'utf8', writeout
+            index++
+          else
+            input.end()
+
+        writeout()
 
 # TODO: set of tests using a file stream as input (use filed? or paths?)
-  describe 'with json file input stream', ->
-
-    it 'should convert unescaped keys to values', (done) ->
-
-      dir = new Path 'test/helpers'
-
-      file = dir.to 'kevas.json'
-
-      expected = JSON.parse dir.to('expected.kevas.json').read()
-
-      stream = kevas values:key:'good'
-
-      output = strung()
-
-      # when all writes are finished then verify the results
-      output.on 'finish', (error) ->
-        if error? then return done error
-        result = JSON.parse output.string
-        assert.deepEqual result, expected
-        done() # tell Mocha the test is done
-
-      # send any errors to Mocha's callback
-      stream.on 'error', done
-      output.on 'error', done
-
-      options = # send errors to `done`
-        reader:
-          events:
-            'error': done
-        writer:
-          events:
-            'error': done
-
-      # pipe our test input to our stream and then to our output collector.
-      file.pipe(stream, options).pipe(output)
+  it 'with json file input stream should convert unescaped keys to values', (done) ->
+
+    dir = new Path 'test/helpers'
+
+    file = dir.to 'kevas.json'
+
+    expected = dir.to('expected.kevas.json').read encoding:'utf8'
+
+    stream = kevas values:key:'good'
+
+    output = strung()
+
+    # when all writes are finished then verify the results
+    output.on 'finish', (error) ->
+      if error? then return done error
+      result = output.string
+      assert.equal result, expected
+      done() # tell Mocha the test is done
+
+    # send any errors to Mocha's callback
+    stream.on 'error', done
+    output.on 'error', done
+
+    options = # send errors to `done`
+      reader:
+        events:
+          'error': done
+      writer:
+        events:
+          'error': done
+
+    # pipe our test input to our stream and then to our output collector.
+    file.pipe(stream, options).pipe(output)
 
 
 

    }
    {
      desc: 'with escaped opening brace'
      should:'should include the brace without the slash'
      output:['some \\{{ value']
      values: key:'good'
      result:'some {{ value'
    }
    {
      desc: 'with an escape slash before first opening brace which voids key'

      result:'some {{ value'
    }
    {
      desc: 'with an escape slash before first opening brace which voids key (1)'
      should:'should match input without key replacement'
      output:['some \\', '{{key}} value']
      values: key:'good'
      result:'some {{key}} value'
    }
    {
      desc: 'with an escape slash before first opening brace which voids key (2)'
      should:'should match input without key replacement'
      output:['some \\{', '{key}} value']
      values: key:'good'
      result:'some {{key}} value'
    }
    {
      desc: 'with two escape slashes before first opening brace which doesnt affect the key (1)'
      output:['some \\\\', '{{key}} value']
      values: key:'good'
      result:'some \\\\good value'
    }
    {
      desc: 'with two escape slashes before first opening brace which doesnt affect the key (2)'
      output:['some \\', '\\{{key}} value']
      values: key:'good'
      result:'some \\good value'
    }
    {
      desc: 'with two escape slashes before first closing brace which becomes part of the key'
      output:['some {{ke\\', '\\y}} value']
      values: 'ke\\\\y':'good'
      result:'some good value'
    }
    {
      desc: 'with escape slash at start of second chunk escaping opening braces'
      output:['some ', '\\{{key}} value']
      values: key:'good'
      result:'some {{key}} value'
    }
    {
      desc: 'with short chunk, previous slash, and slash at start of second chunk'
      should:'should escape slash and still match key'
      output:['some \\', '\\{', '{key}} value']
      values: key:'good'
      result:'some \\good value'
    }
    {
      desc: 'with lots of output chunks'
      should:'should still escape a brace and match proper key'
