Add tests for deeply nested and records
This commit is contained in:
parent
00f862725c
commit
e499c1a887
|
@ -42,6 +42,39 @@ describe("Log function", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Array", () => {
|
||||||
|
test("nested Array", () => {
|
||||||
|
expect(testRun("[[1]]")).toEqual({
|
||||||
|
tag: "array",
|
||||||
|
value: [
|
||||||
|
{
|
||||||
|
tag: "array",
|
||||||
|
value: [
|
||||||
|
{
|
||||||
|
tag: "number",
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("Record", () => {
|
||||||
|
test("Return record", () => {
|
||||||
|
expect(testRun("{a: 1}")).toEqual({
|
||||||
|
tag: "record",
|
||||||
|
value: {
|
||||||
|
a: {
|
||||||
|
tag: "number",
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("Distribution", () => {
|
describe("Distribution", () => {
|
||||||
//It's important that sampleCount is less than 9. If it's more, than that will create randomness
|
//It's important that sampleCount is less than 9. If it's more, than that will create randomness
|
||||||
//Also, note, the value should be created using makeSampleSetDist() later on.
|
//Also, note, the value should be created using makeSampleSetDist() later on.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user