diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/dictionaries/valid-dictionary1/term_bank_1.json | 27 | ||||
-rw-r--r-- | test/test-database.js | 4 |
2 files changed, 28 insertions, 3 deletions
diff --git a/test/data/dictionaries/valid-dictionary1/term_bank_1.json b/test/data/dictionaries/valid-dictionary1/term_bank_1.json index 5094dd0f..a2c9a216 100644 --- a/test/data/dictionaries/valid-dictionary1/term_bank_1.json +++ b/test/data/dictionaries/valid-dictionary1/term_bank_1.json @@ -12,5 +12,30 @@ ["画像", "がぞう", "n", "n", 1, ["gazou definition 1", {"type": "image", "path": "image.gif", "width": 350, "height": 350, "description": "gazou definition 2", "pixelated": true}], 5, "P E1"], ["読む", "よむ", "vt", "v5", 100, ["to read"], 6, "P E1"], ["強み", "つよみ", "n", "n", 90, ["strong point"], 7, "P E1"], - ["テキスト", "テキスト", "n", "n", 1, ["text definition 1", {"type": "text", "text": "text definition 2"}], 8, "P E1"] + ["テキスト", "テキスト", "n", "n", 1, ["text definition 1", {"type": "text", "text": "text definition 2"}], 8, "P E1"], + [ + "内容", "ないよう", "n", "n", 35, + [ + "naiyou definition 1", + {"type": "structured-content", "content": "naiyou definition 2"}, + {"type": "structured-content", "content": ["naiyou definition 3"]}, + {"type": "structured-content", "content": {"tag": "img", "path": "image.gif", "width": 35, "height": 35, "pixelated": true}}, + {"type": "structured-content", "content": [ + "naiyou definition 5: ", + {"tag": "img", "path": "image.gif", "width": 35, "height": 35, "pixelated": true, "collapsible": false}, + "\nmore content 1: ", + {"tag": "img", "path": "image.gif", "width": 35, "height": 35, "pixelated": true, "collapsible": true}, + "\nmore content 2: ", + {"tag": "img", "path": "image.gif", "width": 35, "height": 35, "pixelated": true, "collapsible": false, "collapsed": false, "verticalAlign": "middle"}, + " and ", + {"tag": "img", "path": "image.gif", "width": 35, "height": 35, "pixelated": true, "collapsible": false, "collapsed": true} + ]}, + {"type": "structured-content", "content": [ + "naiyou definition 6: ", + {"tag": "ruby", "content": ["内", {"tag": "rp", "content": "("}, {"tag": "rt", "content": "ない"}, {"tag": "rp", "content": ")"}]}, + {"tag": "ruby", "content": ["容", {"tag": "rp", "content": "("}, {"tag": "rt", "content": "よう"}, {"tag": "rp", "content": ")"}]} + ]} + ], + 9, "P E1" + ] ]
\ No newline at end of file diff --git a/test/test-database.js b/test/test-database.js index da4cc6d3..e68a39ba 100644 --- a/test/test-database.js +++ b/test/test-database.js @@ -162,8 +162,8 @@ async function testDatabase1() { true ); vm.assert.deepStrictEqual(counts, { - counts: [{kanji: 2, kanjiMeta: 2, terms: 14, termMeta: 12, tagMeta: 15, media: 1}], - total: {kanji: 2, kanjiMeta: 2, terms: 14, termMeta: 12, tagMeta: 15, media: 1} + counts: [{kanji: 2, kanjiMeta: 2, terms: 15, termMeta: 12, tagMeta: 15, media: 1}], + total: {kanji: 2, kanjiMeta: 2, terms: 15, termMeta: 12, tagMeta: 15, media: 1} }); // Test find* functions |