-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f85f1e
commit cc9a7df
Showing
10 changed files
with
21 additions
and
184 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts"; | ||
import { test, expect } from "bun:test"; | ||
|
||
const deploymentURL = Deno.env.get("DEPLOYMENT_URL"); | ||
const deploymentURL = process.env.DEPLOYMENT_URL; | ||
if (!deploymentURL) { | ||
throw new Error("DEPLOYMENT_URL not set"); | ||
} | ||
|
||
Deno.test("works", async () => { | ||
test("works", async () => { | ||
console.log({ deploymentURL }); | ||
const res = await fetch(deploymentURL); | ||
const body = await res.text(); | ||
console.log({ body }); | ||
assertEquals(res.status, 200); | ||
expect(res.status).toBe(200); | ||
const json = JSON.parse(body) as { counter: number }; | ||
assertEquals(typeof json.counter, "number"); | ||
}); | ||
expect(typeof json.counter).toBe("number"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters