1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

rollback plaid changes in specs

This commit is contained in:
Tyler Myracle 2024-01-19 19:29:18 -06:00
parent d4984fba31
commit 18562477bf
3 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,5 @@
import type { User } from '@prisma/client' import type { User } from '@prisma/client'
import { PrismaClient, InvestmentTransactionCategory } from '@prisma/client' import { PrismaClient } from '@prisma/client'
import { createLogger, transports } from 'winston' import { createLogger, transports } from 'winston'
import { DateTime } from 'luxon' import { DateTime } from 'luxon'
import { import {
@ -130,7 +130,7 @@ describe('balance sync strategies', () => {
amount: 100, amount: 100,
quantity: 10, quantity: 10,
price: 10, price: 10,
category: InvestmentTransactionCategory.buy, plaidType: 'buy',
}, },
{ {
date: DateTime.fromISO('2023-02-04').toJSDate(), date: DateTime.fromISO('2023-02-04').toJSDate(),
@ -139,7 +139,7 @@ describe('balance sync strategies', () => {
amount: -50, amount: -50,
quantity: 5, quantity: 5,
price: 10, price: 10,
category: InvestmentTransactionCategory.sell, plaidType: 'sell',
}, },
{ {
date: DateTime.fromISO('2023-02-04').toJSDate(), date: DateTime.fromISO('2023-02-04').toJSDate(),
@ -147,7 +147,6 @@ describe('balance sync strategies', () => {
amount: 50, amount: 50,
quantity: 50, quantity: 50,
price: 1, price: 1,
category: InvestmentTransactionCategory.other,
}, },
], ],
}, },

View file

@ -15,9 +15,6 @@ import { resetUser } from './utils/user'
jest.mock('../lib/teller.ts') jest.mock('../lib/teller.ts')
// For TypeScript support
//const teller = jest.mocked(_teller)
const authId = '__TEST_USER_ID__' const authId = '__TEST_USER_ID__'
let axios: AxiosInstance let axios: AxiosInstance
let user: User | null let user: User | null

View file

@ -1,5 +1,5 @@
import type { User } from '@prisma/client' import type { User } from '@prisma/client'
import { Prisma, PrismaClient, InvestmentTransactionCategory } from '@prisma/client' import { Prisma, PrismaClient } from '@prisma/client'
import { createLogger, transports } from 'winston' import { createLogger, transports } from 'winston'
import { DateTime } from 'luxon' import { DateTime } from 'luxon'
import type { import type {
@ -305,7 +305,8 @@ describe('insight service', () => {
amount: 50 * 100, amount: 50 * 100,
quantity: 50, quantity: 50,
price: 100, price: 100,
category: InvestmentTransactionCategory.buy, plaidType: 'buy',
plaidSubtype: 'buy',
}, },
{ {
accountId: account.id, accountId: account.id,
@ -315,7 +316,8 @@ describe('insight service', () => {
amount: 10 * 200, amount: 10 * 200,
quantity: 10, quantity: 10,
price: 200, price: 200,
category: InvestmentTransactionCategory.buy, plaidType: 'buy',
plaidSubtype: 'buy',
}, },
{ {
accountId: account.id, accountId: account.id,
@ -325,7 +327,8 @@ describe('insight service', () => {
amount: -20.22, amount: -20.22,
quantity: 0, quantity: 0,
price: 0, price: 0,
category: InvestmentTransactionCategory.dividend, plaidType: 'cash',
plaidSubtype: 'dividend',
}, },
{ {
accountId: account.id, accountId: account.id,
@ -335,7 +338,8 @@ describe('insight service', () => {
amount: -22.85, amount: -22.85,
quantity: 0, quantity: 0,
price: 0, price: 0,
category: InvestmentTransactionCategory.dividend, plaidType: 'cash',
plaidSubtype: 'dividend',
}, },
], ],
}) })