From f05d08952439d0d98da99d7d02f24152b78fadb0 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Fri, 29 Apr 2022 15:02:24 -0400 Subject: [PATCH] Fixed most tests Value: [1e-5 to 1e-3] --- packages/squiggle-lang/src/js/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/js/index.ts b/packages/squiggle-lang/src/js/index.ts index 98a79b84..5bd02f67 100644 --- a/packages/squiggle-lang/src/js/index.ts +++ b/packages/squiggle-lang/src/js/index.ts @@ -4,6 +4,7 @@ import { samplingParams, environment, evaluatePartialUsingExternalBindings, + evaluateUsingOptions, externalBindings, expressionValue, recordEV, @@ -110,7 +111,10 @@ export function run( ? samplingInputs : defaultSamplingInputs; let e = environ ? environ : defaultEnvironment; - let res: result = eval(squiggleString); // , b, e); + let res: result = evaluateUsingOptions( + { externalBindings: b, environment: e }, + squiggleString + ); // , b, e); return resultMap(res, (x) => createTsExport(x, si)); }