@@ -13,7 +13,6 @@ describe("Payload encryption", () => {
1313 const jweConfig = JSON . parse ( JSON . stringify ( jweTestConfig ) ) ;
1414 jweConfig [ 'encryptedValueFieldName' ] = "encryptedValue" ;
1515 const fle = new FieldLevelEncryption ( config ) ;
16- const jweFle = new FieldLevelEncryption ( jweConfig ) ;
1716 const encryptBody = FieldLevelEncryption . __get__ ( "encryptBody" ) ;
1817 const decryptBody = FieldLevelEncryption . __get__ ( "decryptBody" ) ;
1918
@@ -198,6 +197,7 @@ describe("Payload encryption", () => {
198197 } ) ;
199198
200199 it ( "jwe with sibling" , ( ) => {
200+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
201201 const body = {
202202 data : {
203203 field1 : "value1" ,
@@ -214,6 +214,7 @@ describe("Payload encryption", () => {
214214 } ) ;
215215
216216 it ( "jwe destination obj not exists" , ( ) => {
217+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
217218 const body = {
218219 itemsToEncrypt : {
219220 first : "first" ,
@@ -234,6 +235,7 @@ describe("Payload encryption", () => {
234235 } ) ;
235236
236237 it ( "jwe elem not found" , ( ) => {
238+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
237239 const body = {
238240 itemsToEncrypt : {
239241 first : "first" ,
@@ -253,6 +255,7 @@ describe("Payload encryption", () => {
253255 } ) ;
254256
255257 it ( "jwe nested object to encrypt" , ( ) => {
258+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
256259 const body = {
257260 path : {
258261 to : {
@@ -274,6 +277,7 @@ describe("Payload encryption", () => {
274277 } ) ;
275278
276279 it ( "jwe nested object, create different nested object and delete it" , ( ) => {
280+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
277281 const body = {
278282 path : {
279283 to : {
@@ -306,6 +310,7 @@ describe("Payload encryption", () => {
306310 } ) ;
307311
308312 it ( "jwe nested properties, create new obj" , ( ) => {
313+ const jweFle = new FieldLevelEncryption ( jweConfig ) ;
309314 const body = {
310315 path : {
311316 to : {
0 commit comments