From b8ac9e29b59e7e32d90a9d1c8e7a0efa66ea7efd Mon Sep 17 00:00:00 2001 From: cmorten Date: Sun, 28 Jan 2024 17:11:04 +0000 Subject: [PATCH] publish typedocs --- docs/index.html | 50 +++++++++++++++++++++--------------- docs/modules/_superoak_.html | 6 ++--- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/index.html b/docs/index.html index 2317cda..1a7e0b6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -82,7 +82,7 @@

SuperOak

SuperOak latest /x/ version - Minimum supported Deno version + Minimum supported Deno version SuperOak dependency count SuperOak dependency outdatedness SuperOak cached size @@ -126,7 +126,7 @@

Installation

SuperOak is also available on nest.land, a package registry for Deno on the Blockchain.

-

Note: All examples in this README are using the unversioned form of the import URL. In production you should always use the versioned import form such as https://deno.land/x/superoak@4.7.0/mod.ts.

+

Note: All examples in this README are using the unversioned form of the import URL. In production you should always use the versioned import form such as https://deno.land/x/superoak@4.8.0/mod.ts.

Example

@@ -137,8 +137,8 @@

Example

ephemeral port and closing of the server on a call to .end().

SuperOak works with any Deno test framework. Here's an example with Deno's built-in test framework.

-
import { Application, Router } from "https://deno.land/x/oak@v10.4.0/mod.ts";
-import { superoak } from "https://deno.land/x/superoak@4.7.0/mod.ts";
+				
import { Application, Router } from "https://deno.land/x/oak@v12.6.2/mod.ts";
+import { superoak } from "https://deno.land/x/superoak@4.8.0/mod.ts";
 
 const router = new Router();
 router.get("/", (ctx) => {
@@ -162,7 +162,8 @@ 

Example

// https://visionmedia.github.io/superagent/#post--put-requests. Deno.test("it should allow post requests", async () => { const request = await superoak(app); - await request.post("/user") + await request + .post("/user") .set("Content-Type", "application/json") .send('{"name":"superoak"}') .expect(200); @@ -230,26 +231,35 @@

Request has been terminated error

Instead you should make all of your assertions on a single SuperOak instance, or create a new SuperOak instance for subsequent assertions like below:

// ✅ works
-Deno.test("it will allow you to make multiple assertions on one SuperOak instance", async () => {
-  const request = await superoak(app);
-  await request.get("/").expect(200).expect("Hello Deno!");
-});
+Deno.test(
+  "it will allow you to make multiple assertions on one SuperOak instance",
+  async () => {
+    const request = await superoak(app);
+    await request.get("/").expect(200).expect("Hello Deno!");
+  }
+);
 
 // ✅ works
-Deno.test("it will allow you to re-use the Application for another SuperOak instance", async () => {
-  const request1 = await superoak(app);
-  await request1.get("/").expect(200);
+Deno.test(
+  "it will allow you to re-use the Application for another SuperOak instance",
+  async () => {
+    const request1 = await superoak(app);
+    await request1.get("/").expect(200);
 
-  const request2 = await superoak(app);
-  await request2.get("/").expect("Hello Deno!");
-});
+    const request2 = await superoak(app);
+    await request2.get("/").expect("Hello Deno!");
+  }
+);
 
 // ❌ won't work
-Deno.test("it will throw an error if try to re-use a SuperOak instance", async () => {
-  const request = await superoak(app);
-  await request.get("/").expect(200);
-  await request.get("/").expect("Hello Deno!"); // Boom 💥 `Error: Request has been terminated`
-});
+Deno.test(
+  "it will throw an error if try to re-use a SuperOak instance",
+  async () => {
+    const request = await superoak(app);
+    await request.get("/").expect(200);
+    await request.get("/").expect("Hello Deno!"); // Boom 💥 `Error: Request has been terminated`
+  }
+);
 

Contributing

diff --git a/docs/modules/_superoak_.html b/docs/modules/_superoak_.html index 1dde37e..6fb4d77 100644 --- a/docs/modules/_superoak_.html +++ b/docs/modules/_superoak_.html @@ -91,7 +91,7 @@

Private isOakApplicat
  • @@ -121,7 +121,7 @@

    Private random

  • @@ -154,7 +154,7 @@

    superoak