Files
redstone-cache-layer/test/lite-mode-routes/configs.test.ts
2022-06-06 09:13:33 +02:00

22 lines
657 B
TypeScript

import request from "supertest";
import { app } from "../../app";
import { connect, closeDatabase } from "../helpers/test-db";
describe.only("Testing configs route", () => {
beforeAll(async () => await connect());
afterAll(async () => await closeDatabase());
test("Should return tokens config", async () => {
const response = await request(app)
.get("/configs/tokens")
.expect(200);
for (const symbol of ["BTC", "ETH", "LINK", "AR"]) {
expect(response.body).toHaveProperty(symbol);
expect(response.body[symbol]).toHaveProperty("name");
expect(response.body[symbol]).toHaveProperty("logoURI");
}
});
});