Better describe test cases
This commit is contained in:
parent
697bb85346
commit
aa8c865480
|
@ -10,7 +10,7 @@ let testRun = (x: string) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("A simple result", () => {
|
describe("Simple calculations and results", () => {
|
||||||
test("mean(normal(5,2))", () => {
|
test("mean(normal(5,2))", () => {
|
||||||
expect(testRun("mean(normal(5,2))")).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 5 } ] })
|
expect(testRun("mean(normal(5,2))")).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 5 } ] })
|
||||||
})
|
})
|
||||||
|
@ -18,10 +18,15 @@ describe("A simple result", () => {
|
||||||
let foo = testRun("10 + 10")
|
let foo = testRun("10 + 10")
|
||||||
expect(foo).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 20 } ] })
|
expect(foo).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 20 } ] })
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
describe("Log function", () => {
|
||||||
test("log(1) = 0", () => {
|
test("log(1) = 0", () => {
|
||||||
let foo = testRun("log(1)")
|
let foo = testRun("log(1)")
|
||||||
expect(foo).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 0} ]})
|
expect(foo).toEqual({ tag: 'Ok', value: [ { NAME: 'Float', VAL: 0} ]})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe("Multimodal too many weights error", () => {
|
||||||
test("mm(0,0,[0,0,0])", () => {
|
test("mm(0,0,[0,0,0])", () => {
|
||||||
let foo = testRun("mm(0,0,[0,0,0])")
|
let foo = testRun("mm(0,0,[0,0,0])")
|
||||||
expect(foo).toEqual({ "tag": "Error", "value": "Function multimodal error: Too many weights provided" })
|
expect(foo).toEqual({ "tag": "Error", "value": "Function multimodal error: Too many weights provided" })
|
||||||
|
|
Loading…
Reference in New Issue
Block a user