Skip to content

Commit

Permalink
define prettier eol
Browse files Browse the repository at this point in the history
  • Loading branch information
denco committed Nov 9, 2023
1 parent 2961240 commit 4b8efc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/suite/markupParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ suite("MarkupParser Tests", function () {

const expectedContent = prettier.format(
fs.readFileSync(fixtureFile, FILE_ENCODING).replace(new RegExp(TEST_EXTENSION_PATH_PLACEHOLDER, 'g'), `${TEST_EXTENSION_PATH_PLACEHOLDER_REPLACE_PREFIX}${project_root_dir}`),
{ parser: "html", endOfLine: 'auto'}
{ parser: "html", endOfLine: 'lf'}
);

const testFileUri = vscode.Uri.file(fullFilePath);
const confluenceContent = fs.readFileSync(testFileUri.fsPath, FILE_ENCODING).replace(/\n/g, eolMap.get(eolMapKey));

// const rawRenderedHtml = `<!DOCTYPE html><html lang="und"><head><title>${testName}</title></head><body>${parseMarkup(testFileUri, confluenceContent)}</body></html>`;
const rawRenderedHtml = parseMarkup(testFileUri, confluenceContent);
const formattedContent = prettier.format(rawRenderedHtml, { parser: "html", endOfLine: 'auto'});
const formattedContent = prettier.format(rawRenderedHtml, { parser: "html", endOfLine: 'lf'});
assert.strictEqual(expectedContent, formattedContent);
});
});
Expand Down

0 comments on commit 4b8efc7

Please sign in to comment.