Skip to content

Commit

Permalink
use template literals
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 13, 2019
1 parent a16251d commit ff127c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ beforeEach(() => {
result.pass = htmlDiffer.isEqual(expected, actual);

if (result.pass) {
result.message = spec.markdown + '\n------\n\nExpected: Should Fail';
result.message = `${spec.markdown}\n------\n\nExpected: Should Fail`;
} else {
const diff = htmlDiffer.firstDiff(actual, expected);
result.message = 'Expected: ' + diff.expected + '\n Actual: ' + diff.actual;
result.message = `Expected: ${diff.expected}\n Actual: ${diff.actual}`;
}
return result;
}
Expand Down
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ function fix() {
if (path.extname(file) === '.md') {
if (fm.test(text)) {
text = fm(text);
text = '---\n' + text.frontmatter + '\ngfm: false\n---\n' + text.body;
text = `---\n${text.frontmatter}\ngfm: false\n---\n${text.body}`;
} else {
text = '---\ngfm: false\n---\n' + text;
text = `---\ngfm: false\n---\n${text}`;
}
}

Expand Down Expand Up @@ -372,7 +372,7 @@ function fix() {
// markdown does some strange things.
// it does not encode naked `>`, marked does.
{
const file = dir + '/amps_and_angles_encoding.html';
const file = `${dir}/amps_and_angles_encoding.html`;
const html = fs.readFileSync(file, 'utf8')
.replace('6 > 5.', '6 > 5.');

Expand Down Expand Up @@ -417,7 +417,7 @@ function parseArg(argv) {
if (arg.length > 2) {
// e.g. -abc
argv = arg.substring(1).split('').map(ch => {
return '-' + ch;
return `-${ch}`;
}).concat(argv);
arg = argv.shift();
} else {
Expand Down

0 comments on commit ff127c5

Please sign in to comment.