aboutsummaryrefslogtreecommitdiff
path: root/test/anki-template-renderer.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/anki-template-renderer.test.js')
-rw-r--r--test/anki-template-renderer.test.js24
1 files changed, 12 insertions, 12 deletions
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}) => {