Skip to content

Commit

Permalink
Fixed previousRoundRankRepository.test.ts issue with new take snapsho…
Browse files Browse the repository at this point in the history
…t procedure
  • Loading branch information
aminlatifi committed Jul 31, 2023
1 parent 58a84da commit c25218b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/repositories/previousRoundRankRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import {
insertSinglePowerBoosting,
takePowerBoostingSnapshot,
} from './powerBoostingRepository';
import {
findInCompletePowerSnapShots,
insertSinglePowerBalanceSnapshot,
} from './powerSnapshotRepository';
import { findInCompletePowerSnapShots } from './powerSnapshotRepository';
import { getPowerRound, setPowerRound } from './powerRoundRepository';
import {
getProjectPowers,
Expand All @@ -32,6 +29,7 @@ import { assert } from 'chai';
import { ProjectPowerView } from '../views/projectPowerView';
import { findProjectById } from './projectRepository';
import { PowerRound } from '../entities/powerRound';
import { addOrUpdatePowerSnapshotBalances } from './powerBalanceSnapshotRepository';

describe(
'copyProjectRanksToPreviousRoundRankTable test cases',
Expand Down Expand Up @@ -82,7 +80,7 @@ const createSomeSampleProjectsAndPowerViews = async () => {
snapshot.roundNumber = roundNumber;
await snapshot.save();

await insertSinglePowerBalanceSnapshot({
await addOrUpdatePowerSnapshotBalances({
userId: user.id,
powerSnapshotId: snapshot.id,
balance: 100,
Expand Down Expand Up @@ -146,7 +144,7 @@ function projectsThatTheirRanksHaveChangedTestCases() {
snapshot.roundNumber = roundNumber;
await snapshot.save();

await insertSinglePowerBalanceSnapshot({
await addOrUpdatePowerSnapshotBalances({
userId: user.id,
powerSnapshotId: snapshot.id,

Expand Down

0 comments on commit c25218b

Please sign in to comment.