var assert = require('assert'); var Diff2Html = require('../src/diff2html.js').Diff2Html; var diffExample1 = 'diff --git a/sample b/sample\n' + 'index 0000001..0ddf2ba\n' + '--- a/sample\n' + '+++ b/sample\n' + '@@ -1 +1 @@\n' + '-test\n' + '+test1\n'; var jsonExample1 = [ { blocks: [ { lines: [ { content: '-test', type: 'd2h-del', oldNumber: 1, newNumber: null }, { content: '+test1', type: 'd2h-ins', oldNumber: null, newNumber: 1 } ], oldStartLine: '1', oldStartLine2: null, newStartLine: '1', header: '@@ -1 +1 @@' } ], deletedLines: 1, addedLines: 1, checksumBefore: '0000001', checksumAfter: '0ddf2ba', oldName: 'sample', language: undefined, newName: 'sample', isCombined: false } ]; var filesExample1 = '
\n' + ' | \n' +
' @@ -1 +1 @@ \n' +
' | \n' +
'
\n' +
' 1 \n' +
'\n' +
' | \n' +
' \n' +
' \n' +
' -\n' +
' \n' +
' | \n' +
'
\n' +
' \n' +
' 1 \n' +
' | \n' +
' \n' +
' \n' +
' +\n' +
' test1\n' +
' \n' +
' | \n' +
'
\n' + ' | \n' +
' @@ -1 +1 @@ \n' +
' | \n' +
'
\n' + ' 1\n' + ' | \n' + '\n' +
' \n' +
' -\n' +
' \n' +
' | \n' +
'
\n' + ' | \n' + ' \n' + ' | \n' + '
\n' + ' 1\n' + ' | \n' + '\n' +
' \n' +
' +\n' +
' test1\n' +
' \n' +
' | \n' +
'
Use the following format for additions: ` - VERSION: [feature/patch (if applicable)] Short description of change. Links to relevant issues/PRs.`\n' +
' $a="
|