Option to hide false or true values in truthTable

This commit is contained in:
Martin Berg Alstad
2024-06-16 00:36:59 +02:00
parent b9998ce7bf
commit 9431eb2fa9
2 changed files with 73 additions and 6 deletions

View File

@ -82,3 +82,21 @@ GET {{url}}/simplify/table/{{expression}}?sort=TRUE_FIRST
}
});
%}
### GET with table and hide false values
< {%
import {expression} from "./common";
expression("A & B | C")
%}
GET {{url}}/simplify/table/{{expression}}?hide=FALSE
> {%
client.test("Response body does not contain false values", () => {
const table = response.body.truthTable;
const results = table.truthMatrix.map(arr => arr[arr.length - 1])
for (let i = 0; i < results.length; i++) {
client.assert(results[i] === true, "Response body contains false values")
}
});
%}