Skip to content

Commit 27badee

Browse files
authored
1 parent 9b91b43 commit 27badee

File tree

7 files changed

+17
-26
lines changed

7 files changed

+17
-26
lines changed

.denov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.32.0
1+
v0.33.0

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
run: |
2626
export PATH=$HOME/.local/bin:$PATH
2727
sleep 10
28-
deno -A couch_test.ts
28+
deno test -A couch_test.ts

couch_test.ts

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
import { runIfMain, test } from "./vendor/https/deno.land/std/testing/mod.ts";
21
import { CouchClient } from "./couch.ts";
32
import {
43
assert,
54
assertEquals
65
} from "./vendor/https/deno.land/std/testing/asserts.ts";
76
import open = Deno.open;
7+
const { test } = Deno;
88

99
const kDbName = "testdb";
1010
const env = Deno.env();
1111
const endpoint = env["COUCHDB_ENDPOINT"] || "http://127.0.0.1:5984";
1212
const client = new CouchClient(endpoint);
1313
const db = client.database(kDbName);
1414

15-
async function beforeAll() {
16-
if (await client.databaseExists(kDbName)) {
17-
await client.deleteDatabase(kDbName);
18-
}
19-
await client.createDatabase(kDbName);
20-
}
21-
22-
async function afterAll() {
23-
await client.deleteDatabase(kDbName);
24-
}
2515

2616
async function useDatabase(f: (db: string) => Promise<unknown>) {
2717
const name = "testdb-" + Math.round(Math.random() * 10000000);
@@ -35,6 +25,12 @@ async function useDatabase(f: (db: string) => Promise<unknown>) {
3525
}
3626
});
3727
}
28+
test("beforeAll", async () => {
29+
if (await client.databaseExists(kDbName)) {
30+
await client.deleteDatabase(kDbName);
31+
}
32+
await client.createDatabase(kDbName);
33+
});
3834

3935
test(async function metadata() {
4036
const data = await client.metadata();
@@ -206,10 +202,7 @@ test(async function deleteAttachment() {
206202
assertEquals(res, void 0);
207203
});
208204

209-
beforeAll()
210-
.then(() =>
211-
runIfMain(import.meta, {
212-
parallel: true
213-
})
214-
)
215-
.then(afterAll);
205+
test("afterAll", async () => {
206+
await client.deleteDatabase(kDbName);
207+
});
208+

modules-lock.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"https://deno.land/std": {
3-
"version": "@v0.32.0",
3+
"version": "@v0.33.0",
44
"modules": [
5-
"/testing/mod.ts",
65
"/testing/asserts.ts"
76
]
87
}

modules.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"https://deno.land/std": {
3-
"version": "@v0.32.0",
4-
"modules": ["/testing/mod.ts", "/testing/asserts.ts"]
3+
"version": "@v0.33.0",
4+
"modules": ["/testing/asserts.ts"]
55
}
66
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.32.0/testing/asserts.ts";
1+
export * from "https://deno.land/std@v0.33.0/testing/asserts.ts";

vendor/https/deno.land/std/testing/mod.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)