summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/jupyter/integration_test.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/jupyter/integration_test.ipynb')
-rw-r--r--cli/tests/testdata/jupyter/integration_test.ipynb52
1 files changed, 52 insertions, 0 deletions
diff --git a/cli/tests/testdata/jupyter/integration_test.ipynb b/cli/tests/testdata/jupyter/integration_test.ipynb
index c1b31724c..25d55e88c 100644
--- a/cli/tests/testdata/jupyter/integration_test.ipynb
+++ b/cli/tests/testdata/jupyter/integration_test.ipynb
@@ -630,6 +630,58 @@
},
{
"cell_type": "markdown",
+ "id": "9f38f1eb",
+ "metadata": {},
+ "source": [
+ "## Unit Tests With `Deno.test()`"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "b33808fd",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "passing test ... \u001b[0m\u001b[32mok\u001b[0m \u001b[0m\u001b[38;5;245m(1ms)\u001b[0m\n",
+ "passing test with steps ...\n",
+ " step 1 ... \u001b[0m\u001b[32mok\u001b[0m \u001b[0m\u001b[38;5;245m(0ms)\u001b[0m\n",
+ " step 2 ... \u001b[0m\u001b[32mok\u001b[0m \u001b[0m\u001b[38;5;245m(0ms)\u001b[0m\n",
+ "passing test with steps ... \u001b[0m\u001b[32mok\u001b[0m \u001b[0m\u001b[38;5;245m(1ms)\u001b[0m\n",
+ "failing test ... \u001b[0m\u001b[31mFAILED\u001b[0m \u001b[0m\u001b[38;5;245m(1ms)\u001b[0m\n",
+ "\n",
+ "\u001b[0m\u001b[1m\u001b[37m\u001b[41m ERRORS \u001b[0m\n",
+ "\n",
+ "failing test \u001b[0m\u001b[38;5;245m=> <anonymous>:7:6\u001b[0m\n",
+ "\u001b[0m\u001b[1m\u001b[31merror\u001b[0m: Error: some message\n",
+ " at \u001b[0m\u001b[36m<anonymous>\u001b[0m:\u001b[0m\u001b[33m8\u001b[0m:\u001b[0m\u001b[33m9\u001b[0m\n",
+ "\n",
+ "\u001b[0m\u001b[1m\u001b[37m\u001b[41m FAILURES \u001b[0m\n",
+ "\n",
+ "failing test \u001b[0m\u001b[38;5;245m=> <anonymous>:7:6\u001b[0m\n",
+ "\n",
+ "\u001b[0m\u001b[31mFAILED\u001b[0m | 2 passed (2 steps) | 1 failed \u001b[0m\u001b[38;5;245m(0ms)\u001b[0m\n"
+ ]
+ }
+ ],
+ "source": [
+ "Deno.test(\"passing test\", () => {});\n",
+ "\n",
+ "Deno.test(\"passing test with steps\", async (t) => {\n",
+ " await t.step(\"step 1\", () => {});\n",
+ " await t.step(\"step 2\", () => {});\n",
+ "});\n",
+ "\n",
+ "Deno.test(\"failing test\", () => {\n",
+ " throw new Error(\"some message\");\n",
+ "});\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
"id": "8822eed9-a801-4c1b-81c0-00e4ff180f40",
"metadata": {},
"source": [