Skip to content

Commit

Permalink
feat(vendure): test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Dec 21, 2024
1 parent 5fb66d6 commit 863b154
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/elasticsearch-plugin/src/build-elastic-body.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('buildElasticBody()', () => {
multi_match: {
query: 'test',
type: 'best_fields',
fields: ['productName^1', 'productVariantName^1', 'description^1', 'sku^1'],
fuzziness: 'AUTO',
fields: ['productName^5', 'productVariantName^5', 'description^1', 'sku^1'],
},
},
],
Expand Down Expand Up @@ -389,7 +390,8 @@ describe('buildElasticBody()', () => {
multi_match: {
query: 'test',
type: 'best_fields',
fields: ['productName^1', 'productVariantName^1', 'description^1', 'sku^1'],
fuzziness: 'AUTO',
fields: ['productName^5', 'productVariantName^5', 'description^1', 'sku^1'],
},
},
],
Expand Down Expand Up @@ -427,7 +429,8 @@ describe('buildElasticBody()', () => {
multi_match: {
query: 'test',
type: 'phrase',
fields: ['productName^1', 'productVariantName^1', 'description^1', 'sku^1'],
fuzziness: 'AUTO',
fields: ['productName^5', 'productVariantName^5', 'description^1', 'sku^1'],
},
},
],
Expand Down Expand Up @@ -456,6 +459,7 @@ describe('buildElasticBody()', () => {
multi_match: {
query: 'test',
type: 'best_fields',
fuzziness: 'AUTO',
fields: ['productName^3', 'productVariantName^4', 'description^2', 'sku^5'],
},
},
Expand All @@ -482,7 +486,7 @@ describe('buildElasticBody()', () => {
const result = buildElasticBody({ term: 'test' }, config, CHANNEL_ID, LanguageCode.en);
expect(result.script_fields).toEqual({
test: {
script: 'doc[\'property\'].dummyScript(test)',
script: "doc['property'].dummyScript(test)",
},
});
});
Expand Down

0 comments on commit 863b154

Please sign in to comment.