UNPKG

@ahryman40k/ts-fhir-types

Version:

Typescript / Javascript object model for FHIR standard Model follows FHIR R4 specifications.

15 lines 708 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var index_1 = require("../index"); var T = index_1.R4.RTTI_xhtml; var invalid_value = "\n<!DOCTYPE html>\n <html lang=\"en\">\n// omit head\n <body>World</body>\n</html>"; var valid_value = "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>Hello</title>\n</head>\n<body>\n World\n</body>\n</html>"; describe('Scalar xhtml', function () { test("should decode a valid value", function () { expect(T.decode(valid_value)._tag).toBe('Right'); }); test("Should not decode value with wrong type", function () { expect(T.decode(2)._tag).toBe('Left'); }); }); //# sourceMappingURL=xhtml.spec.js.map