aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-12-17 16:11:19 -0500
committerGitHub <noreply@github.com>2021-12-17 16:11:19 -0500
commit19ab9df6e4110ef7d5927c95993141a1f8960c53 (patch)
tree31849bf1e1c9622cd1aa3aeb0709ad95ffc744b1 /test
parent70fa701c906fa4319e0d62818fe5737e983b49ef (diff)
Replace 'wildcard' parameter with 'matchType' (#2038)
Diffstat (limited to 'test')
-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);