Skip to content

Commit

Permalink
chore: impl suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLucqs committed Apr 10, 2024
1 parent c262448 commit 819bbc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
8 changes: 4 additions & 4 deletions backend/test/getBalance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import {
StartedPostgreSqlContainer,
} from '@testcontainers/postgresql';
import { FastifyInstance } from 'fastify';
import postgres from 'postgres';
import * as schema from '../src/db/schema';

import { buildApp } from '@/app';

describe('GET /get_balance route', () => {
let container: StartedPostgreSqlContainer;
let app: FastifyInstance;
let sql: any;
const testAddress =
'0x004babd76a282efdd30b97c8a98b0f2e4ebb91e81b3542bfd124c086648a07af';

Expand All @@ -28,9 +27,10 @@ describe('GET /get_balance route', () => {
});

await app.ready();
sql = postgres(connectionUri);
// Insert balance to mock address
await sql`insert into balance_usdc (address, balance) values (${testAddress}, '1000')`;
await app.db
.insert(schema.usdcBalance)
.values({ address: testAddress, balance: '1000' });
});

afterAll(async () => {
Expand Down
29 changes: 0 additions & 29 deletions backend/test/utils/testDatabase.ts

This file was deleted.

0 comments on commit 819bbc6

Please sign in to comment.