Cleanup from merge
This commit is contained in:
parent
4b103cb128
commit
6634718ba9
|
@ -29,31 +29,6 @@ let toExt: option<'a> => 'a = E.O.toExt(
|
||||||
"Should be impossible to reach (This error is in test file)",
|
"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", () => {
|
describe("sparkline", () => {
|
||||||
let runTest = (
|
let runTest = (
|
||||||
name: string,
|
name: string,
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preset: 'ts-jest',
|
preset: "ts-jest",
|
||||||
testEnvironment: 'node',
|
testEnvironment: "node",
|
||||||
testPathIgnorePatterns: [".*Fixtures.bs.js", "/node_modules/", ".*Helpers.bs.js"],
|
|
||||||
setupFilesAfterEnv: [
|
setupFilesAfterEnv: [
|
||||||
"<rootdir>/../../node_modules/bisect_ppx/src/runtime/js/jest.bs.js"
|
"<rootdir>/../../node_modules/bisect_ppx/src/runtime/js/jest.bs.js",
|
||||||
],
|
],
|
||||||
testPathIgnorePatterns: [
|
testPathIgnorePatterns: [
|
||||||
"__tests__/TestHelpers.bs.js"
|
".*Fixtures.bs.js",
|
||||||
],
|
"/node_modules/",
|
||||||
|
".*Helpers.bs.js",
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user