diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json index 05e943f8e..dd842c335 100644 --- a/tests/.eslintrc.json +++ b/tests/.eslintrc.json @@ -14,18 +14,9 @@ "space-in-parens": "off", "camelcase": "warn", - "comma-dangle": "warn", - "eol-last": "warn", "new-cap": "warn", - "prefer-arrow-callback": "warn", - "prefer-const": "warn", - "no-trailing-spaces": "warn", - "no-undef": "warn", - "no-useless-escape": "warn", - "no-var": "warn", - "semi": "warn", "strict": "warn", - "quotes": "warn", - "unicorn/prefer-date-now": "warn" + "no-undef": "warn", + "no-useless-escape": "warn" } } diff --git a/tests/jest.setup.js b/tests/jest.setup.js index 96a9a1696..a63a116eb 100644 --- a/tests/jest.setup.js +++ b/tests/jest.setup.js @@ -1,7 +1,7 @@ // Tweak some mw.configs as needed by tests mw.config.set({ wgPageName: 'Macbeth,_King_of_Scotland', - wgUserGroups: ['interface-admin', 'sysop', '*', 'user', 'autoconfirmed'], + wgUserGroups: ['interface-admin', 'sysop', '*', 'user', 'autoconfirmed'] }); require('../morebits.js'); @@ -20,9 +20,9 @@ assert.true = function (arg, message) { if (arg !== true) { throw new Error(message); } -} +}; assert.false = function (arg, message) { if (arg !== false) { throw new Error(message); } -} +}; diff --git a/tests/morebits.batchOperation.js b/tests/morebits.batchOperation.js index 38ec8e6b4..76bab9616 100644 --- a/tests/morebits.batchOperation.js +++ b/tests/morebits.batchOperation.js @@ -2,14 +2,14 @@ describe('Morebits.batchOperation', () => { test('Contruction', () => { assert.true(new Morebits.batchOperation() instanceof Morebits.batchOperation, 'Correct instance'); }); - var batch = new Morebits.batchOperation(); - var pageList = ['Macbeth', 'Hamlet', 'Romeo and Juliet', 'Much Ado About Nothing', 'Tempest']; + const batch = new Morebits.batchOperation(); + const pageList = ['Macbeth', 'Hamlet', 'Romeo and Juliet', 'Much Ado About Nothing', 'Tempest']; batch.setPageList(pageList); - var chunkLength = 2; + const chunkLength = 2; batch.setOption('chunkSize', chunkLength); test('Run', () => { - var all = ''; - var runFunc = function (page) { + let all = ''; + const runFunc = function (page) { all += page; batch.workerSuccess(); }; @@ -18,8 +18,8 @@ describe('Morebits.batchOperation', () => { }); // Will leave a run hanging, who cares? test('Chunksize', () => { - var list = []; - var runFunc = function (page) { + const list = []; + const runFunc = function (page) { list.push(page); }; batch.run(runFunc); diff --git a/tests/morebits.createHtml.js b/tests/morebits.createHtml.js index d6e2a97c5..63563c9e4 100644 --- a/tests/morebits.createHtml.js +++ b/tests/morebits.createHtml.js @@ -23,17 +23,17 @@ describe('Morebits.createHtml', () => { test('renderWikilinks', () => { assert.strictEqual( Morebits.createHtml.renderWikilinks('[[Main Page]]'), - `Main Page`, + 'Main Page', 'simple link' ); assert.strictEqual( Morebits.createHtml.renderWikilinks('surrounding text [[Main Page|the main page]]'), - `surrounding text the main page`, + 'surrounding text the main page', 'link with display text' ); assert.strictEqual( Morebits.createHtml.renderWikilinks('surrounding text [["Weird Al" Yankovic]]'), - `surrounding text "Weird Al" Yankovic`, + 'surrounding text "Weird Al" Yankovic', // jsdom in node turns " in title attribute into " whereas Chrome seems turns it into " // but it works either way 'link with double quote' @@ -41,7 +41,7 @@ describe('Morebits.createHtml', () => { assert.strictEqual( Morebits.createHtml.renderWikilinks('[[CODE]] [[Yankovic]]'), - `[[CODE]] Yankovic`, + '[[CODE]] Yankovic', 'wikilink in tag' ); }); diff --git a/tests/morebits.date.js b/tests/morebits.date.js index 6b7a2ef87..c39cbef26 100644 --- a/tests/morebits.date.js +++ b/tests/morebits.date.js @@ -1,10 +1,10 @@ describe('Morebits.date', () => { - var now = Date.now(); - var ts_mw = '16:26, 7 November 2020 (UTC)', ts_iso = '2020-11-07T16:26:00.000Z', naive = 20201107162600; + const now = Date.now(); + const ts_mw = '16:26, 7 November 2020 (UTC)', ts_iso = '2020-11-07T16:26:00.000Z', naive = 20201107162600; test('Construction', () => { // getTime and toISOString imply testing of inherited methods // Allow off-by-one values in milliseconds for not-quite-simultaneous date contructions - expect(Math.abs(new Morebits.date().getTime() - new Date().getTime())).toBeLessThanOrEqual(1); + expect(Math.abs(new Morebits.date().getTime() - Date.now())).toBeLessThanOrEqual(1); assert.strictEqual(new Morebits.date(now).getTime(), new Date(now).getTime(), 'Constructor from timestring'); assert.strictEqual(new Morebits.date(2020, 11, 7, 16, 26).getTime(), new Date(2020, 11, 7, 16, 26).getTime(), 'Constructor from parts'); @@ -14,7 +14,7 @@ describe('Morebits.date', () => { assert.strictEqual(new Morebits.date(parseInt(naive / 10, 10)).toISOString(), new Date(parseInt(naive / 10, 10)).toISOString(), 'native 13 digit'); assert.strictEqual(new Morebits.date(naive * 10).toISOString(), new Date(naive * 10).toISOString(), 'native 15 digit'); }); - var date = new Morebits.date(ts_mw); + const date = new Morebits.date(ts_mw); test('Methods', () => { assert.true(date.isValid(), 'Valid'); // Logs a message; not a failure, but annoying diff --git a/tests/morebits.quickForm.js b/tests/morebits.quickForm.js index 42b7817aa..964aa59dd 100644 --- a/tests/morebits.quickForm.js +++ b/tests/morebits.quickForm.js @@ -1,77 +1,81 @@ -/** Simple helper to render a quickform element */ +/** + * Simple helper to render a quickform element + * + * @param data + */ function renderElement(data) { return new Morebits.quickForm.element(data).render(); } -describe("quickform", () => { - let inputConfig = { - type: "input", - label: "Label", - name: "inputname", - value: "prefilled value", +describe('quickform', () => { + const inputConfig = { + type: 'input', + label: 'Label', + name: 'inputname', + value: 'prefilled value' }; - let selectConfig = { - type: "select", - label: "Select label", - name: "selectname", + const selectConfig = { + type: 'select', + label: 'Select label', + name: 'selectname', list: [ - { label: "select label 1", value: "selectvalue1" }, - { label: "select label 2", value: "selectvalue2" }, - ], + { label: 'select label 1', value: 'selectvalue1' }, + { label: 'select label 2', value: 'selectvalue2' } + ] }; - let checkboxListConfig = { - type: "checkbox", - name: "checkboxlist1", + const checkboxListConfig = { + type: 'checkbox', + name: 'checkboxlist1', list: [ - { label: "checkbox 1", value: "checkval1" }, - { label: "checkbox 2", value: "checkval2", checked: true }, - ], + { label: 'checkbox 1', value: 'checkval1' }, + { label: 'checkbox 2', value: 'checkval2', checked: true } + ] }; - let checkboxesConfig = { - type: "checkbox", + const checkboxesConfig = { + type: 'checkbox', list: [ { - label: "checkbox 1", - value: "checkval1", - name: "checkname1", - checked: true, + label: 'checkbox 1', + value: 'checkval1', + name: 'checkname1', + checked: true }, - { label: "checkbox 2", value: "checkval2", name: "checkname2" }, - ], + { label: 'checkbox 2', value: 'checkval2', name: 'checkname2' } + ] }; - let radiosConfig = { - type: "radio", - name: "radiolist1", + const radiosConfig = { + type: 'radio', + name: 'radiolist1', list: [ { - label: "radio 1", - value: "radioval1", - name: "radioname1", + label: 'radio 1', + value: 'radioval1', + name: 'radioname1' }, { - label: "radio 2", - value: "radioval2", - name: "radioname2", - checked: true, - }, - ], + label: 'radio 2', + value: 'radioval2', + name: 'radioname2', + checked: true + } + ] }; - let textareaConfig = { - type: "textarea", - name: "textareaname1", - value: "textarea prefilled value", - cols: 4, + const textareaConfig = { + type: 'textarea', + name: 'textareaname1', + value: 'textarea prefilled value', + cols: 4 }; - let submitConfig = { - type: "submit", + const submitConfig = { + type: 'submit' }; - let buttonConfig = { - type: "button", - label: "button label", + const buttonConfig = { + type: 'button', + label: 'button label' }; - let getRenderedForm = () => { - let form = new Morebits.quickForm(function () {}); + const getRenderedForm = () => { + const form = new Morebits.quickForm(() => {}); form.append(inputConfig); form.append(checkboxesConfig); form.append(checkboxListConfig); @@ -80,42 +84,42 @@ describe("quickform", () => { form.append(submitConfig); form.append(buttonConfig); return form.render(); - } + }; - test("input element", () => { + test('input element', () => { expect(renderElement(inputConfig)).toMatchSnapshot(); }); - test("select element", () => { + test('select element', () => { expect(renderElement(selectConfig)).toMatchSnapshot(); }); - test("checkbox elements", () => { + test('checkbox elements', () => { expect(renderElement(checkboxListConfig)).toMatchSnapshot(); }); - test("checkbox elements (with data-single attribute)", () => { + test('checkbox elements (with data-single attribute)', () => { expect(renderElement(checkboxesConfig)).toMatchSnapshot(); }); - test("radio elements", () => { + test('radio elements', () => { expect(renderElement(radiosConfig)).toMatchSnapshot(); }); - test("textarea element", () => { + test('textarea element', () => { expect(renderElement(textareaConfig)).toMatchSnapshot(); }); - test("submit", () => { + test('submit', () => { expect(renderElement(submitConfig)).toMatchSnapshot(); }); - test("getInputData", () => { + test('getInputData', () => { expect(Morebits.quickForm.getInputData(getRenderedForm())).toMatchSnapshot(); }); - test("getElements", () => { - let form = getRenderedForm(); + test('getElements', () => { + const form = getRenderedForm(); expect(Morebits.quickForm.getElements(form, 'checkboxlist1')).toMatchSnapshot(); }); diff --git a/tests/morebits.string.js b/tests/morebits.string.js index 43505b9c7..cdedfc1f0 100644 --- a/tests/morebits.string.js +++ b/tests/morebits.string.js @@ -4,24 +4,24 @@ describe('Morebits.string', () => { assert.strictEqual(Morebits.string.escapeRegExp('Four_score_and_seven_years_ago'), 'Four[_ ]score[_ ]and[_ ]seven[_ ]years[_ ]ago', 'Underscores'); }); test('formatReasonForLog', () => { - var reason = 'They were wrong'; + const reason = 'They were wrong'; assert.strictEqual(Morebits.string.formatReasonForLog(reason), reason, 'Simple, unchanged'); - var more = 'Really wrong'; + const more = 'Really wrong'; assert.strictEqual(Morebits.string.formatReasonForLog(reason + '\n' + more), reason + '{{pb}}' + more, '\n -> {{pb}}'); assert.strictEqual(Morebits.string.formatReasonForLog('#' + reason + '\n' + more), '##' + reason + '{{pb}}' + more, 'Prepend extra #'); assert.strictEqual(Morebits.string.formatReasonForLog('*' + reason + '\n' + more), '#*' + reason + '{{pb}}' + more, 'Prepend extra #'); }); test('formatReasonText', () => { - var reason = 'They were correct'; + let reason = 'They were correct'; assert.strictEqual(Morebits.string.formatReasonText(reason), reason, 'Simple, unchanged'); assert.strictEqual(Morebits.string.formatReasonText(reason, true), reason + ' ~~~~', 'Simple'); - var more = 'Technically correct'; + const more = 'Technically correct'; assert.strictEqual(Morebits.string.formatReasonText(reason + '|' + more), reason + '{{subst:!}}' + more, 'Replace pipe'); assert.strictEqual(Morebits.string.formatReasonText(reason + '|' + more, true), reason + '{{subst:!}}' + more + ' ~~~~', 'Replace pipe'); reason += 'The {{best|kind|of}} correct: '; assert.strictEqual(Morebits.string.formatReasonText(reason + more), reason + more, 'No replace in nowiki'); assert.strictEqual(Morebits.string.formatReasonText(), '', 'Empty'); - var alreadySigned = 'already signed ~~~~'; + const alreadySigned = 'already signed ~~~~'; assert.strictEqual(Morebits.string.formatReasonText(alreadySigned, true), alreadySigned, 'No sig duplication'); assert.strictEqual(Morebits.string.formatReasonText('alreadySigned~~~~ ', true), 'alreadySigned~~~~', 'trims and avoids duplicating sig'); assert.strictEqual(Morebits.string.formatReasonText('Wow', true), 'Wow ~~~~', '3-letter reason'); @@ -38,13 +38,13 @@ describe('Morebits.string', () => { assert.false(Morebits.string.isInfinity('2020-04-17T09:31:00.000Z'), 'ISO string'); }); test('safeReplace', () => { - var string = '{{subst:board|thread=$SECTION|but=$NOTTHIS}} ~~~~'; + const string = '{{subst:board|thread=$SECTION|but=$NOTTHIS}} ~~~~'; assert.strictEqual(Morebits.string.safeReplace(string, '$SECTIONAL', 'thread$'), string, 'No replacement'); assert.strictEqual(Morebits.string.safeReplace(string, '$SECTION', 'thread$'), '{{subst:board|thread=thread$|but=$NOTTHIS}} ~~~~', 'Replacement'); }); test('splitWeightedByKeys', () => { - var split = ['{{thisis|one|template}}', '{{another|one}}', '[[heresalink]]', '[[thislink|ispiped]]']; - var text = split.join(' also '); + const split = ['{{thisis|one|template}}', '{{another|one}}', '[[heresalink]]', '[[thislink|ispiped]]']; + const text = split.join(' also '); assert.deepEqual(Morebits.string.splitWeightedByKeys(text, '{{', '}}'), split.slice(0, 2), 'Templates'); assert.deepEqual(Morebits.string.splitWeightedByKeys(text, '[[', ']]'), split.slice(2), 'Links'); assert.deepEqual(Morebits.string.splitWeightedByKeys(text, '{{', '}}', split[0]), [split[1]], 'Skiplist, non-array'); diff --git a/tests/morebits.taskManager.js b/tests/morebits.taskManager.js index e3d8e48bf..b44ad04fc 100644 --- a/tests/morebits.taskManager.js +++ b/tests/morebits.taskManager.js @@ -1,13 +1,13 @@ describe('Morebits.taskManager', () => { test('Contruction', () => { - var tm = new Morebits.taskManager(); + const tm = new Morebits.taskManager(); assert.true(tm instanceof Morebits.taskManager, 'Correct instance'); }); // Helper to generate functions as well as testing output in proper order; // verifySteps not used because it would require some extra duplication - var data = {}; - var generateFuncs = () => { + const data = {}; + const generateFuncs = () => { data.out = []; ['one', 'two', 'three', 'four'].forEach((step) => { data[step] = () => { @@ -19,7 +19,7 @@ describe('Morebits.taskManager', () => { test('Simple', () => { generateFuncs(); - var simple = new Morebits.taskManager(); + const simple = new Morebits.taskManager(); simple.add(data.one, []); simple.add(data.two, [data.one]); simple.add(data.three, [data.two]); @@ -30,7 +30,7 @@ describe('Morebits.taskManager', () => { }); test('Complex', () => { generateFuncs(); - var complex = new Morebits.taskManager(); + const complex = new Morebits.taskManager(); complex.add(data.one, [data.two]); complex.add(data.two, [data.three, data.four]); complex.add(data.three, []); diff --git a/tests/morebits.unbinder.js b/tests/morebits.unbinder.js index fa3419557..2540f457c 100644 --- a/tests/morebits.unbinder.js +++ b/tests/morebits.unbinder.js @@ -2,13 +2,13 @@ describe('Morebits.unbinder', () => { test('Construction', () => { assert.throws(() => new Morebits.unbinder(), 'throws: no string'); assert.throws(() => new Morebits.unbinder([42]), 'throws: not a string'); - var u = new Morebits.unbinder('Hello world'); + const u = new Morebits.unbinder('Hello world'); assert.true(u instanceof Morebits.unbinder, 'Correct instance'); assert.throws(() => u.unbind(), 'throws: Missing prefix'); assert.throws(() => u.unbind('w'), 'throws: Missing postfix'); }); test('Run', () => { - var u = new Morebits.unbinder('Hello world world'); + let u = new Morebits.unbinder('Hello world world'); u.unbind(''); u.content = u.content.replace(/world/g, 'earth'); assert.strictEqual(u.rebind(), 'Hello earth earth', 'Simple replace'); diff --git a/tests/morebits.wikitext.js b/tests/morebits.wikitext.js index c1942878d..2bf15abd0 100644 --- a/tests/morebits.wikitext.js +++ b/tests/morebits.wikitext.js @@ -1,15 +1,15 @@ describe('Morebits.wikitext', () => { test('parseTemplate', () => { // Function to help build a template from a sample object - var makeTemplate = function (data) { - var template = '{{' + data.name; - Object.keys(data.parameters).forEach(function (key) { + const makeTemplate = function (data) { + let template = '{{' + data.name; + Object.keys(data.parameters).forEach((key) => { template += '|' + key + '=' + data.parameters[key]; }); return template + '}}'; }; - var simple = { + const simple = { name: 'prod', parameters: { reason: 'because', @@ -19,7 +19,7 @@ describe('Morebits.wikitext', () => { }; assert.deepEqual(Morebits.wikitext.parseTemplate('Template: ' + makeTemplate(simple) + ' in text', 10), simple, 'Basic parameters'); - var involved = { + const involved = { name: 'Proposed deletion/dated', parameters: { concern: 'Text (paren) then [[piped|link]] and [[WP:WP/LINK]] {{{plural|with|a|template}}} then question?', @@ -31,10 +31,10 @@ describe('Morebits.wikitext', () => { assert.deepEqual(Morebits.wikitext.parseTemplate(makeTemplate(involved)), involved, 'Involved parameters'); // Try a variety of whitespace options - var whitespace = '{{' + involved.name + ' |concern = ' + involved.parameters.concern + ' | timestamp =' + involved.parameters.timestamp + '| nom= ' + involved.parameters.nom + '|help = ' + involved.parameters.help + ' }}'; + const whitespace = '{{' + involved.name + ' |concern = ' + involved.parameters.concern + ' | timestamp =' + involved.parameters.timestamp + '| nom= ' + involved.parameters.nom + '|help = ' + involved.parameters.help + ' }}'; assert.deepEqual(Morebits.wikitext.parseTemplate(whitespace), involved, 'Involved parameters with whitespace'); - var unnamed = { + const unnamed = { name: 'db-meta', parameters: { criterion: 'G13', @@ -43,10 +43,10 @@ describe('Morebits.wikitext', () => { 2: 'extra' } }; - var unnamedTemplate = '{{' + unnamed.name + '|criterion=' + unnamed.parameters.criterion + '||' + unnamed.parameters['1'] + '| middle =|2= ' + unnamed.parameters['2'] + '|}}'; + const unnamedTemplate = '{{' + unnamed.name + '|criterion=' + unnamed.parameters.criterion + '||' + unnamed.parameters['1'] + '| middle =|2= ' + unnamed.parameters['2'] + '|}}'; assert.deepEqual(Morebits.wikitext.parseTemplate(unnamedTemplate), unnamed, 'Unnamed and empty parameters'); - var multiLevel = { + const multiLevel = { name: 'toplevel', parameters: { named: '{{namedtop}}', @@ -56,7 +56,7 @@ describe('Morebits.wikitext', () => { } }; assert.deepEqual(Morebits.wikitext.parseTemplate(makeTemplate(multiLevel)), multiLevel, 'Multiple levels'); - var parser = { + const parser = { name: 'toplevel', parameters: { named: '{{namedtop}}', @@ -67,7 +67,7 @@ describe('Morebits.wikitext', () => { }; assert.deepEqual(Morebits.wikitext.parseTemplate(makeTemplate(parser)), parser, 'Parser function'); - var internal = { + const internal = { name: 'internal', parameters: { named: 'parameter {{tq|with an internal}} template', @@ -80,8 +80,8 @@ describe('Morebits.wikitext', () => { }); test('Morebits.wikitext.page', () => { - var text = '{{short description}}{{about}}[[File:Fee.svg]]O, [[Juliet|she]] doth {{plural|teach}} the torches to burn bright!'; - var page = new Morebits.wikitext.page(text); + const text = '{{short description}}{{about}}[[File:Fee.svg]]O, [[Juliet|she]] doth {{plural|teach}} the torches to burn bright!'; + const page = new Morebits.wikitext.page(text); assert.true(page instanceof Morebits.wikitext.page, 'Correct instance'); assert.strictEqual(page.getText(), text, 'Got text'); @@ -91,7 +91,7 @@ describe('Morebits.wikitext', () => { // Define all the tests individually, with the appropriate method, // input, expected output, and (spreaded) parameters. - var tests = [ + const tests = [ { name: 'simple', method: 'removeLink', @@ -354,7 +354,7 @@ describe('Morebits.wikitext', () => { ]; tests.forEach((test) => { - var page = new Morebits.wikitext.page(test.input); + const page = new Morebits.wikitext.page(test.input); assert.strictEqual(page[test.method](...test.params).getText(), test.expected, test.method + ' - ' + test.name); }); }); diff --git a/tests/twinkletag.test.js b/tests/twinkletag.test.js index 16f913d55..dc9586b0d 100644 --- a/tests/twinkletag.test.js +++ b/tests/twinkletag.test.js @@ -6,7 +6,7 @@ describe('modules/twinkletag', () => { const expected = undefined; expect(Twinkle.tag.checkIncompatible(incompatibleTags, tagsToCheck)).toBe(expected); }); - + test('no conflicts, 1 tag to check', () => { const incompatibleTags = ['Bad GIF', 'Bad JPEG', 'Bad SVG', 'Bad format']; const tagsToCheck = ['Better source requested']; diff --git a/tests/twinklewarn.test.js b/tests/twinklewarn.test.js index de88f45cf..3684775a1 100644 --- a/tests/twinklewarn.test.js +++ b/tests/twinklewarn.test.js @@ -1,6 +1,6 @@ describe('modules/twinklewarn', () => { describe('getTemplateProperty', () => { - let templates = { + const templates = { levels: { 'Common warnings': { 'uw-vandalism': { @@ -24,7 +24,7 @@ describe('modules/twinklewarn', () => { label: 'Vandalism', summary: 'Only warning: Vandalism' } - }, + } } }, @@ -34,15 +34,15 @@ describe('modules/twinklewarn', () => { summary: 'Notice: Not using edit summary', hideLinkedPage: true, hideReason: true - }, + } }, - + singlewarn: { 'uw-attack': { label: 'Creating attack pages', summary: 'Warning: Creating attack pages', suppressArticleInSummary: true - }, + } } }; @@ -74,4 +74,4 @@ describe('modules/twinklewarn', () => { expect(Twinkle.warn.getTemplateProperty(templates, 'uw-editsummary2', 'hideLinkedPage')).toBe(true); }); }); -}); \ No newline at end of file +}); diff --git a/tests/twinklexfd.test.js b/tests/twinklexfd.test.js index b96b87a8f..0fd9812bb 100644 --- a/tests/twinklexfd.test.js +++ b/tests/twinklexfd.test.js @@ -4,7 +4,7 @@ describe('modules/twinklexfd', () => { const pageWikitext = ` ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core}} @@ -18,7 +18,7 @@ describe('modules/twinklexfd', () => { ` ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core}} @@ -33,7 +33,7 @@ describe('modules/twinklexfd', () => { ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core}} @@ -47,7 +47,7 @@ describe('modules/twinklexfd', () => { ` * {{RMassist/core2}} ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core2}} @@ -63,7 +63,7 @@ describe('modules/twinklexfd', () => { * {{RMassist/core2}} * {{RMassist/core3}} ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core2}} @@ -80,7 +80,7 @@ describe('modules/twinklexfd', () => { * {{RMassist/core2}} ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core2}} @@ -97,7 +97,7 @@ describe('modules/twinklexfd', () => { ==== Requests to revert undiscussed moves ====`; - const wikitextToInsert = `* {{RMassist/core}}`; + const wikitextToInsert = '* {{RMassist/core}}'; const expected = ` * {{RMassist/core2}}