@@ -25,6 +25,7 @@ describe("generate", () => {
2525 'export const indexHash = "abc";' ,
2626 "export const searchResultLimits = 8;" ,
2727 "export const searchResultContextMaxLength = 50;" ,
28+ 'export const translations = {"hello":"hola"};' ,
2829 ] ,
2930 ] ,
3031 [
@@ -41,6 +42,7 @@ describe("generate", () => {
4142 'export const indexHash = "abc";' ,
4243 "export const searchResultLimits = 8;" ,
4344 "export const searchResultContextMaxLength = 50;" ,
45+ 'export const translations = {"hello":"hola"};' ,
4446 ] ,
4547 ] ,
4648 [
@@ -59,6 +61,7 @@ describe("generate", () => {
5961 'export const indexHash = "abc";' ,
6062 "export const searchResultLimits = 8;" ,
6163 "export const searchResultContextMaxLength = 50;" ,
64+ 'export const translations = {"hello":"hola"};' ,
6265 ] ,
6366 ] ,
6467 [
@@ -80,6 +83,7 @@ describe("generate", () => {
8083 'export const indexHash = "abc";' ,
8184 "export const searchResultLimits = 8;" ,
8285 "export const searchResultContextMaxLength = 50;" ,
86+ 'export const translations = {"hello":"hola"};' ,
8387 ] ,
8488 ] ,
8589 [
@@ -99,6 +103,7 @@ describe("generate", () => {
99103 'export const indexHash = "abc";' ,
100104 "export const searchResultLimits = 8;" ,
101105 "export const searchResultContextMaxLength = 50;" ,
106+ 'export const translations = {"hello":"hola"};' ,
102107 ] ,
103108 ] ,
104109 [
@@ -121,6 +126,7 @@ describe("generate", () => {
121126 'export const indexHash = "abc";' ,
122127 "export const searchResultLimits = 8;" ,
123128 "export const searchResultContextMaxLength = 50;" ,
129+ 'export const translations = {"hello":"hola"};' ,
124130 ] ,
125131 ] ,
126132 ] ) ( "generate({ language: %j }, dir) should work" , ( language , contents ) => {
@@ -130,6 +136,9 @@ describe("generate", () => {
130136 removeDefaultStopWordFilter : false ,
131137 searchResultLimits : 8 ,
132138 searchResultContextMaxLength : 50 ,
139+ translations : {
140+ "hello" : "hola"
141+ } ,
133142 } as ProcessedPluginOptions ,
134143 "/tmp"
135144 ) ;
@@ -151,6 +160,9 @@ describe("generate", () => {
151160 highlightSearchTermsOnTargetPage : true ,
152161 searchResultLimits : 8 ,
153162 searchResultContextMaxLength : 50 ,
163+ translations : {
164+ "hello" : "hola"
165+ }
154166 } as ProcessedPluginOptions ,
155167 "/tmp"
156168 ) ;
0 commit comments