|
@@ -247,4 +247,14 @@ v"It works!"
|
|
|
});
|
|
|
cb.run();
|
|
|
expect(output.out).toBe("It works!");
|
|
|
+});
|
|
|
+
|
|
|
+test("Test - factorial of ten", () => {
|
|
|
+ const output = new OutputJoiner("");
|
|
|
+ const cb = new CodeBox(` :?\\~11>*l1\\
|
|
|
+-1:/ ;n\\?- /`, [10], {
|
|
|
+ outputCallback: output.push.bind(output),
|
|
|
+ });
|
|
|
+ cb.run();
|
|
|
+ expect(output.out).toBe("3628800");
|
|
|
});
|