diff --git a/tests/DCC/CoreDataType.test.ts b/tests/DCC/CoreDataType.test.ts index cd463a8b5fc2a2361ef0e81a2fdc6f8a6500c951..2a0d3acbf3bceead5dc56cc371ec4bd535d75a82 100644 --- a/tests/DCC/CoreDataType.test.ts +++ b/tests/DCC/CoreDataType.test.ts @@ -15,20 +15,20 @@ const xpath = { }; describe("CoreDataType", () => { - let dcc: DCCDocument, coreData: CoreDataType; + let dcc: DCCDocument, coreData: CoreDataType, dom; beforeEach(async () => { - ({ dcc } = await xmlEnv.recreateEnv()); + ({ dcc, dom } = await xmlEnv.recreateEnv()); coreData = dcc.digitalCalibrationCertificate.administrativeData.coreData; }); test("should get correct countryCodeISO3166_1 from XML", () => { - expect(coreData.countryCodeISO3166_1._text).toBe(select(xpath.countryCodeISO3166_1, dcc)); + expect(coreData.countryCodeISO3166_1._text).toBe(select(xpath.countryCodeISO3166_1, dom)); }); test("should get correct usedLangCodeISO639_1 from XML", () => { // get expected list from example xml - const expected = <Element[]>select(xpath.usedLangCodeISO639_1, dcc); + const expected = <Element[]>select(xpath.usedLangCodeISO639_1, dom); expect(toTextArr(coreData.usedLangCodeISO639_1)).toEqual(toTextContentArr(expected)); }); @@ -48,7 +48,7 @@ describe("CoreDataType", () => { }); test("should delete usedLangCodeISO639_1 correctly", () => { - const selection = toTextContentArr(<Element[]>select(xpath.usedLangCodeISO639_1, dcc)); + const selection = toTextContentArr(<Element[]>select(xpath.usedLangCodeISO639_1, dom)); fc.assert( fc.property(fc.constantFrom(...selection), (str) => { // get index and remove element from array