diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-05-17 20:18:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 20:18:37 -0400 |
commit | 76276e78dac387df66384a10bc1179c90ebd93fe (patch) | |
tree | ba11d7bf4375aa76ae45646b45953df9e71f1d78 /test/test-options-util.js | |
parent | 12451eaf61281e588fb8ef5f911d604ba34aca92 (diff) |
Expose search query to anki template renderer (#1686)
* Expose query and fullQuery to Anki context
* Add {search-query} marker
* Update test data
* Update tests
* Wrap search query in multiLine
Diffstat (limited to 'test/test-options-util.js')
-rw-r--r-- | test/test-options-util.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test-options-util.js b/test/test-options-util.js index 8b65f134..7e11aad1 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -641,6 +641,7 @@ async function testFieldTemplatesUpdate(extDir) { const update6 = loadDataFile('data/templates/anki-field-templates-upgrade-v6.handlebars'); const update8 = loadDataFile('data/templates/anki-field-templates-upgrade-v8.handlebars'); const update10 = loadDataFile('data/templates/anki-field-templates-upgrade-v10.handlebars'); + const update12 = loadDataFile('data/templates/anki-field-templates-upgrade-v12.handlebars'); const data = [ // Standard format @@ -662,6 +663,7 @@ ${update4} ${update6} ${update8} ${update10} +${update12} {{~> (lookup . "marker") ~}}`.trimStart() }, // Non-standard marker format @@ -683,7 +685,8 @@ ${update2} ${update4} ${update6} ${update8} -${update10}`.trimStart() +${update10} +${update12}`.trimStart() }, // Empty test { @@ -696,6 +699,7 @@ ${update4} ${update6} ${update8} ${update10} +${update12} {{~> (lookup . "marker") ~}}`.trimStart() }, // Definition tags update @@ -770,6 +774,7 @@ ${update4} ${update6} ${update8} ${update10} +${update12} {{~> (lookup . "marker") ~}} `.trimStart() }, @@ -911,6 +916,7 @@ ${update10} ${update8} ${update10} +${update12} {{~> (lookup . "marker") ~}}`.trimStart() } ]; |