mirror of
https://github.com/alexgo-io/redstone-cache-layer.git
synced 2026-01-12 22:43:30 +08:00
22 lines
657 B
TypeScript
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");
|
|
}
|
|
});
|
|
});
|