-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.test.ts
40 lines (32 loc) · 1.12 KB
/
index.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Vercel } from ".";
import { expect, test } from "bun:test";
const vercel = new Vercel({
security: {
bearerToken: process.env.VERCEL_API_KEY,
},
});
test("Get Authenticated User", async () => {
const result = await vercel.user.getAuthUser()
expect(result.httpMeta.response.status).toBe(200);
expect(result.object).toBeDefined();
});
test("List Teams", async () => {
const result = await vercel.teams.getTeams()
expect(result.httpMeta.response.status).toBe(200);
expect(result.object).toBeDefined();
});
test("List Webhooks", async () => {
const result = await vercel.webhooks.getWebhooks()
expect(result.httpMeta.response.status).toBe(200);
expect(result.responseBodies).toBeDefined();
});
test("List Deployments", async () => {
const result = await vercel.deployments.getDeployments({})
expect(result.httpMeta.response.status).toBe(200);
expect(result.object).toBeDefined();
});
test("List Secrets", async () => {
const result = await vercel.secrets.getSecrets()
expect(result.httpMeta.response.status).toBe(200);
expect(result.object).toBeDefined();
});