Skip to content

Commit

Permalink
Show diff test result
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Jun 4, 2024
1 parent 4d57caf commit 51f57e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions feishu-docx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@jest/globals": "^29.6.4",
"@types/jsdom": "^21.1.2",
"jest": "^29.6.4",
"jest-diff": "^29.7.0",
"ts-jest": "^29.1.1"
},
"license": "MIT"
Expand Down
10 changes: 4 additions & 6 deletions feishu-docx/tests/markdown_renderer.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { describe, test } from '@jest/globals';
import assert from 'assert';
import fs from 'fs';
import { diff } from 'jest-diff';
import path from 'path';
import { MarkdownRenderer, TableMergeInfo } from '../src';
import { escapeHTMLTags } from '../src/renderer';
Expand Down Expand Up @@ -30,13 +31,10 @@ describe('MarkdownRenderer', () => {
let result = render.parse();

if (result.trim() !== expected.trim()) {
const diffResult = diff(expected.trim(), result.trim());
console.error('test failed on:', caseName);
console.error(`-------------------- expected ----------------`);
console.log(expected.trim());
console.error('----------------- expected end -----------------\n');
console.error(`-------------------- actully -----------------`);
console.log(result.trim());
console.error('----------------- actully end -----------------\n');
console.log(diffResult);
// console.log(result);
}
});
});
Expand Down

0 comments on commit 51f57e1

Please sign in to comment.