Fix failing tests based on new toString

This commit is contained in:
Sam Nolan 2022-04-11 16:31:54 +10:00
parent 0d9e8c64c3
commit 26433c5289
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ describe("Distribution", () => {
}); });
test("toPointSet", () => { test("toPointSet", () => {
expect( expect(
resultMap(dist.toPointSet(), (r: Distribution) => r.toString()).value resultMap(dist.toPointSet(), (r: Distribution) => r.toString())
).toEqual(Ok("Point Set Distribution")); ).toEqual(Ok("Point Set Distribution"));
}); });
test("toSparkline", () => { test("toSparkline", () => {

View File

@ -210,7 +210,7 @@ export class Distribution {
toString(): string { toString(): string {
let result = Constructors_toString({ env: this.env }, this.t); let result = Constructors_toString({ env: this.env }, this.t);
if(result.tag === "Ok"){ if(result.tag === "Ok"){
result.value return result.value
} }
else { else {
return distributionErrorToString(result.value) return distributionErrorToString(result.value)