Skip to content
Snippets Groups Projects

Add tests

Merged Jan Loewe requested to merge feat-jest-tests into master
2 files
+ 8
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -18,6 +18,9 @@ const xpath = {
mimeType: `string(${base}/dcc:noQuantity/dcc:file/dcc:mimeType)`,
dataBase64: `string(${base}/dcc:noQuantity/dcc:file/dcc:dataBase64)`,
},
formula: {
latex: `string(${base}/dcc:noQuantity/dcc:formula/dcc:latex)`,
},
},
};
@@ -41,7 +44,7 @@ describe("noQuantity", () => {
test("should get correct mimeType from XML", () => {
expect(result.data.quantity[0].noQuantity.file[0].mimeType._text).toBe(select(xpath.noQuantity.file.mimeType, dom));
});
test("should get correct dataBase64 from XML", () => {
expect(result.data.quantity[0].noQuantity.file[0].dataBase64._text).toBe(select(xpath.noQuantity.file.dataBase64, dom));
test("should get correct latex formula from XML", () => {
expect(result.data.quantity[0].noQuantity.formula[0].latex._text).toBe(select(xpath.noQuantity.formula.latex, dom));
});
});
Loading