diff --git a/test/user-invocation-table.test.js b/test/user-invocation-table.test.js index 50cbdc1..bcaea0c 100644 --- a/test/user-invocation-table.test.js +++ b/test/user-invocation-table.test.js @@ -75,6 +75,23 @@ describe('concept', () => { expr = "next.concept().select($this | $this.next.concept()).display"; retrieved = fhirpath.evaluate(concepts.a, expr, null, null, options); expect(retrieved).toEqual(["B", "C"]); + }); +}); + +describe("toString", () => { + it("Works when userInvocationTable passed without overriding toString", () => { + const options = { + userInvocationTable: {}, + }; + + let result = fhirpath.evaluate( + { index: 0 }, + "index.toString()", + null, + null, + options + ); + expect(result).toEqual(["0"]); }); });