From 6634718ba93096c2fcf5e7a0a1c701bda66a72f4 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 8 Apr 2022 09:32:48 -0400 Subject: [PATCH] Cleanup from merge --- .../DistributionOperation_test.res | 25 ------------------- packages/squiggle-lang/jest.config.js | 13 +++++----- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res index 3b1219b3..cd22d512 100644 --- a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res @@ -29,31 +29,6 @@ let toExt: option<'a> => 'a = E.O.toExt( "Should be impossible to reach (This error is in test file)", ) -describe("normalize", () => { - test("has no impact on normal dist", () => { - let result = run(FromDist(ToDist(Normalize), normalDist5)) - expect(result)->toEqual(Dist(normalDist5)) - }) -}) - -describe("mean", () => { - test("for a normal distribution", () => { - let result = DistributionOperation.run(~env, FromDist(ToFloat(#Mean), normalDist5)) - expect(result)->toEqual(Float(5.0)) - }) -}) - -describe("mixture", () => { - test("on two normal distributions", () => { - let result = - run(Mixture([(normalDist10, 0.5), (normalDist20, 0.5)])) - ->outputMap(FromDist(ToFloat(#Mean))) - ->toFloat - ->toExt - expect(result)->toBeCloseTo(15.28) - }) -}) - describe("sparkline", () => { let runTest = ( name: string, diff --git a/packages/squiggle-lang/jest.config.js b/packages/squiggle-lang/jest.config.js index f5d19afb..3347de7c 100644 --- a/packages/squiggle-lang/jest.config.js +++ b/packages/squiggle-lang/jest.config.js @@ -1,12 +1,13 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - testPathIgnorePatterns: [".*Fixtures.bs.js", "/node_modules/", ".*Helpers.bs.js"], + preset: "ts-jest", + testEnvironment: "node", setupFilesAfterEnv: [ - "/../../node_modules/bisect_ppx/src/runtime/js/jest.bs.js" + "/../../node_modules/bisect_ppx/src/runtime/js/jest.bs.js", ], testPathIgnorePatterns: [ - "__tests__/TestHelpers.bs.js" - ], + ".*Fixtures.bs.js", + "/node_modules/", + ".*Helpers.bs.js", + ], };