From 90799b4f9c533206db57136e0d5dc9dd7f1d8788 Mon Sep 17 00:00:00 2001 From: Moritz Jordan <moritz.jordan@ptb.de> Date: Tue, 21 Mar 2023 12:26:32 +0100 Subject: [PATCH] Changes by loewe01 --- tests/DCC/CoreDataType.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/DCC/CoreDataType.test.ts b/tests/DCC/CoreDataType.test.ts index cd463a8..2a0d3ac 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 -- GitLab