blob: b2596a0056f72873d8c89138f3fb7765d52fd067 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { fromPython, toPython } from "@/utilities/index";
describe("fromPythonConversion", () => {
it("should convert a true value", () => {
expect(fromPython("True")).toBe(true);
});
it("should convert a false value", () => {
expect(fromPython("False")).toBe(false);
});
it("should convert an undefined value", () => {
expect(fromPython(undefined)).toBe(false);
});
});
describe("toPythonConversion", () => {
it("should convert a true value", () => {
expect(toPython(true)).toBe("True");
});
it("should convert a false value", () => {
expect(toPython(false)).toBe("False");
});
});
|