Skip to content

Commit 84bc9d9

Browse files
committed
Simplify yepcodeApi initialization in tests
1 parent 4f7e973 commit 84bc9d9

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

tests/api/yepcodeApi.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import { YepCodeApi } from "../../src/api/yepcodeApi";
22
import { ProcessesPaginatedResult } from "../../src/api/types";
33

4-
const apiHost = process.env.YEPCODE_API_HOST;
5-
const apiToken = process.env.YEPCODE_API_TOKEN;
6-
7-
let api: YepCodeApi;
4+
const api = new YepCodeApi();
85

96
describe("YepCodeApi", () => {
10-
beforeAll(async () => {
11-
api = new YepCodeApi({ apiHost, apiToken });
12-
});
13-
147
describe("processes", () => {
158
it("should return a paginated list of processes", async () => {
169
const result: ProcessesPaginatedResult = await api.getProcesses();
@@ -25,7 +18,7 @@ describe("YepCodeApi", () => {
2518

2619
it("should return a paginated list of processes with a tag", async () => {
2720
const result: ProcessesPaginatedResult = await api.getProcesses({
28-
tags: ["yc-run"],
21+
tags: ["yc-run", "dummy"],
2922
});
3023

3124
expect(result).toHaveProperty("hasNextPage");

0 commit comments

Comments
 (0)