 {assert} = require 'chai'
+clone    = require 'clone'
 
 HeadersResultConverter = require '../../src/headers-result-converter'
 arrayFixtures = require '../fixtures/gavel2html-legacy'

            dataReal: pointerFixtures.testsHeaders.headersRealFailMiss.dataReal
            dataExpected: pointerFixtures.testsHeaders.headersRealFailMiss.dataExpected
            gavelResult: pointerFixtures.testsHeaders.headersRealFailMiss.gavelResult
          }
          result = jsonResultConverter.getLinesFromResults()
          result = JSON.parse JSON.stringify result
          assert.deepEqual result, expectedOutput


            dataReal: pointerFixtures.testsHeaders.headersRealFailChanged.dataReal
            dataExpected: pointerFixtures.testsHeaders.headersRealFailChanged.dataExpected
            gavelResult: pointerFixtures.testsHeaders.headersRealFailChanged.gavelResult
            usePointers: true
          }
          result = jsonResultConverter.getLinesFromResults()
          result = clone result, false
          assert.deepEqual result, expectedOutput

  describe 'regression test for migration from amandaResults to JSON pointer based results in headers in key missing', () ->
