Skip to content

Commit bb6567a

Browse files
author
Shailesh M. Pachbhai
committed
feat: fix unit test
1 parent 6219a0b commit bb6567a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
/* eslint-disable @typescript-eslint/no-unsafe-call */
22
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
3-
import { expect } from 'chai';
3+
import { expect } from '@salesforce/command/lib/test';
44
import { HTMLParser } from '../../../../src/utils/lwcparser/htmlParser/HTMLParser';
5-
import { FileDiffUtil } from '../../../../src/utils/lwcparser/fileutils/FileDiffUtil';
65

76
describe('HTMLParser test class', () => {
87
const mockFilePath = 'test/utils/lwc/parser/input/test.html';
98
it('should read file content correctly', () => {
109
const htmlParser = new HTMLParser(mockFilePath);
11-
const html: Map<string, string> = htmlParser.replaceTags('omnistudio');
12-
// eslint-disable-next-line no-console
13-
console.log(new FileDiffUtil().getFileDiff('file.txt', html.get('original'), html.get('modified')));
14-
htmlParser.saveToFile('test/utils/lwc/parser/output/test.html', html.get('modified'));
15-
expect(htmlParser.getModifiedHTML()).contains('c-omniscript-step-chart');
10+
htmlParser.replaceTags('omnistudio');
11+
expect(htmlParser.getModifiedHTML()).contains('c-input');
1612
});
1713
});

0 commit comments

Comments
 (0)