From 76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 Mon Sep 17 00:00:00 2001 From: James Maa Date: Fri, 31 May 2024 08:06:52 -0700 Subject: Allow trailing commas in ESLint (#1013) * Update comma-dangle rule * Fix dangling commas --- test/anki-template-renderer.test.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/anki-template-renderer.test.js') diff --git a/test/anki-template-renderer.test.js b/test/anki-template-renderer.test.js index d8d2a3b5..bf18dd0d 100644 --- a/test/anki-template-renderer.test.js +++ b/test/anki-template-renderer.test.js @@ -34,7 +34,7 @@ describe('AnkiTemplateRenderer', () => { tags: [], stats: {}, definitions: [], - frequencies: [] + frequencies: [], }, resultOutputMode: 'split', mode: 'test', @@ -47,43 +47,43 @@ describe('AnkiTemplateRenderer', () => { fullQuery: 'query.full', sentence: { text: 'sentence.query.full', - offset: 9 - } + offset: 9, + }, }, - media: void 0 - } + media: void 0, + }, }; const testCases = [ { name: 'regexMatch 1', template: '{{#regexMatch "test" "gu"}}this is a test of regexMatch{{/regexMatch}}', - result: 'test' + result: 'test', }, { name: 'regexMatch 2', template: '{{regexMatch "test" "gu" "this is a test of regexMatch"}}', - result: 'test' + result: 'test', }, { name: 'regexMatch 3', template: '{{#if (regexMatch "test" "gu" "this is a test of regexMatch")}}true{{else}}false{{/if}}', - result: 'true' + result: 'true', }, { name: 'regexReplace 1', template: '{{#regexReplace "test" "TEST" "gu"}}this is a test of regexReplace{{/regexReplace}}', - result: 'this is a TEST of regexReplace' + result: 'this is a TEST of regexReplace', }, { name: 'regexReplace 2', template: '{{regexReplace "test" "TEST" "gu" "this is a test of regexReplace"}}', - result: 'this is a TEST of regexReplace' + result: 'this is a TEST of regexReplace', }, { name: 'regexReplace 3', template: '{{#if (regexReplace "test" "" "gu" "test")}}true{{else}}false{{/if}}', - result: 'false' - } + result: 'false', + }, ]; describe.each(testCases)('$name', ({template, result: expectedResult}) => { test('Test', ({expect, ankiTemplateRenderer}) => { -- cgit v1.2.3