aboutsummaryrefslogtreecommitdiff
path: root/test/test-database.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-database.js')
-rw-r--r--test/test-database.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test-database.js b/test/test-database.js
index 20eb6fe0..15d4746c 100644
--- a/test/test-database.js
+++ b/test/test-database.js
@@ -218,15 +218,15 @@ async function testFindTermsBulkTest1(database, titles) {
{
inputs: [
{
- wildcard: null,
+ matchType: null,
termList: ['打', '打つ', '打ち込む']
},
{
- wildcard: null,
+ matchType: null,
termList: ['だ', 'ダース', 'うつ', 'ぶつ', 'うちこむ', 'ぶちこむ']
},
{
- wildcard: 'suffix',
+ matchType: 'prefix',
termList: ['打']
}
],
@@ -250,7 +250,7 @@ async function testFindTermsBulkTest1(database, titles) {
{
inputs: [
{
- wildcard: null,
+ matchType: null,
termList: ['込む']
}
],
@@ -263,7 +263,7 @@ async function testFindTermsBulkTest1(database, titles) {
{
inputs: [
{
- wildcard: 'prefix',
+ matchType: 'suffix',
termList: ['込む']
}
],
@@ -281,7 +281,7 @@ async function testFindTermsBulkTest1(database, titles) {
{
inputs: [
{
- wildcard: null,
+ matchType: null,
termList: []
}
],
@@ -294,8 +294,8 @@ async function testFindTermsBulkTest1(database, titles) {
];
for (const {inputs, expectedResults} of data) {
- for (const {termList, wildcard} of inputs) {
- const results = await database.findTermsBulk(termList, titles, wildcard);
+ for (const {termList, matchType} of inputs) {
+ const results = await database.findTermsBulk(termList, titles, matchType);
assert.strictEqual(results.length, expectedResults.total);
for (const [term, count] of expectedResults.terms) {
assert.strictEqual(countDictionaryDatabaseEntriesWithTerm(results, term), count);