Update import statements to use path aliases throughout codebase

This commit is contained in:
GitHub Copilot
2025-05-06 11:53:33 +00:00
parent 984cd42f27
commit 069faac7bc
3 changed files with 38 additions and 35 deletions

View File

@@ -1,7 +1,8 @@
import { AccountType, TransactionType, accountService, transactionService } from '@data/db.service';
import { prisma } from '@data/prisma';
import type { Account, Transaction } from '@types';
import supertest from 'supertest';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { accountService, transactionService } from '../data/db.service';
import { prisma } from '../data/prisma';
// Define a test server
const BASE_URL = 'http://localhost:4322';
@@ -34,7 +35,7 @@ describe('Database Integration Tests', () => {
bankName: 'Test Bank',
accountNumber: '123456',
name: 'Test Account',
type: 'CHECKING',
type: AccountType.CHECKING,
balance: 1000,
notes: 'Created for automated testing',
});
@@ -90,7 +91,7 @@ describe('Database Integration Tests', () => {
expect(response.body.length).toBeGreaterThan(0);
// Check if our test account is in the response
const foundAccount = response.body.find((account: any) => account.id === testAccountId);
const foundAccount = response.body.find((account: Account) => account.id === testAccountId);
expect(foundAccount).toBeDefined();
});
@@ -118,7 +119,7 @@ describe('Database Integration Tests', () => {
description: 'Test Transaction',
amount: -50.25,
category: 'Testing',
type: 'WITHDRAWAL',
type: TransactionType.WITHDRAWAL,
};
const response = await request
@@ -145,7 +146,9 @@ describe('Database Integration Tests', () => {
expect(Array.isArray(response.body)).toBe(true);
// Check if our test transaction is in the response
const foundTransaction = response.body.find((txn: any) => txn.id === testTransactionId);
const foundTransaction = response.body.find(
(txn: Transaction) => txn.id === testTransactionId,
);
expect(foundTransaction).toBeDefined();
expect(foundTransaction.description).toBe('Test Transaction');
});