Skip to content

Commit

Permalink
refactor: organize unit tests in directory
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Oct 4, 2023
1 parent f3e0e62 commit 06ba6b2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ import {
ProposalCreated,
ProposalExecuted,
ProposalQueued,
} from '../../generated/GovernorAlpha/GovernorAlpha';
import { governorBravoDelegateAddress } from '../../src/constants/addresses';
} from '../../../generated/GovernorAlpha/GovernorAlpha';
import { governorBravoDelegateAddress } from '../../../src/constants/addresses';
import {
handleProposalCanceled,
handleProposalCreated,
handleProposalExecuted,
handleProposalQueued,
handleVoteCast,
} from '../../src/mappings/alpha';
import { getOrCreateDelegate } from '../../src/operations/getOrCreate';
import { getVoteId } from '../../src/utilities/ids';
import { user1 } from '../common/constants';
} from '../../../src/mappings/alpha';
import { getOrCreateDelegate } from '../../../src/operations/getOrCreate';
import { getVoteId } from '../../../src/utilities/ids';
import { user1 } from '../../common/constants';
import {
createProposalCanceledEvent,
createProposalCreatedEvent,
createProposalExecutedEvent,
createProposalQueuedEvent,
createVoteCastAlphaEvent,
} from '../common/events';
import { createGovernorBravoMocks } from '../common/mocks';
} from '../../common/events';
import { createGovernorBravoMocks } from '../../common/mocks';

const cleanup = (): void => {
clearStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ProposalThresholdSet,
VotingDelaySet,
VotingPeriodSet,
} from '../../generated/GovernorBravoDelegate/GovernorBravoDelegate';
} from '../../../generated/GovernorBravoDelegate/GovernorBravoDelegate';

export function createNewVotingDelayEvent(
governanceAddress: Address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
test,
} from 'matchstick-as/assembly/index';

import { ProposalCreated as ProposalCreatedV2 } from '../../generated/GovernorBravoDelegate2/GovernorBravoDelegate2';
import { ProposalCreated as ProposalCreatedV2 } from '../../../generated/GovernorBravoDelegate2/GovernorBravoDelegate2';
import {
ProposalCanceled,
ProposalCreated,
ProposalExecuted,
ProposalQueued,
} from '../../generated/GovernorBravoDelegate/GovernorBravoDelegate';
import { governorBravoDelegateAddress } from '../../src/constants/addresses';
} from '../../../generated/GovernorBravoDelegate/GovernorBravoDelegate';
import { governorBravoDelegateAddress } from '../../../src/constants/addresses';
import {
handleBravoVoteCast,
handleNewAdmin,
Expand All @@ -32,19 +32,19 @@ import {
handleProposalThresholdSet,
handleVotingDelaySet,
handleVotingPeriodSet,
} from '../../src/mappings/bravo';
import { getOrCreateDelegate } from '../../src/operations/getOrCreate';
import { getVoteId } from '../../src/utilities/ids';
import { user1 } from '../common/constants';
} from '../../../src/mappings/bravo';
import { getOrCreateDelegate } from '../../../src/operations/getOrCreate';
import { getVoteId } from '../../../src/utilities/ids';
import { user1 } from '../../common/constants';
import {
createProposalCanceledEvent,
createProposalCreatedEvent,
createProposalCreatedV2Event,
createProposalExecutedEvent,
createProposalQueuedEvent,
createVoteCastBravoEvent,
} from '../common/events';
import { createGovernorBravoMocks } from '../common/mocks';
} from '../../common/events';
import { createGovernorBravoMocks } from '../../common/mocks';
import {
createNewAdminEvent,
createNewGuardianEvent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
test,
} from 'matchstick-as/assembly/index';

import { ProposalCreated } from '../../generated/GovernorBravoDelegate/GovernorBravoDelegate';
import { DelegateChangedV2 } from '../../generated/XVSVault/XVSVault';
import { handleProposalCreated } from '../../src/mappings/bravo';
import { handleDelegateChanged } from '../../src/mappings/xvsVault';
import { getOrCreateDelegate } from '../../src/operations/getOrCreate';
import { user1, user2, user3 } from '../common/constants';
import { createDelegateChangedEvent, createProposalCreatedEvent } from '../common/events';
import { createGovernorBravoMocks } from '../common/mocks';
import { ProposalCreated } from '../../../generated/GovernorBravoDelegate/GovernorBravoDelegate';
import { DelegateChangedV2 } from '../../../generated/XVSVault/XVSVault';
import { handleProposalCreated } from '../../../src/mappings/bravo';
import { handleDelegateChanged } from '../../../src/mappings/xvsVault';
import { getOrCreateDelegate } from '../../../src/operations/getOrCreate';
import { user1, user2, user3 } from '../../common/constants';
import { createDelegateChangedEvent, createProposalCreatedEvent } from '../../common/events';
import { createGovernorBravoMocks } from '../../common/mocks';

const cleanup = (): void => {
clearStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { afterEach, assert, clearStore, describe, test } from 'matchstick-as/ass
import {
PermissionGranted,
PermissionRevoked,
} from '../../generated/AccessControlManager/AccessControlManger';
import { GRANTED, REVOKED } from '../../src/constants';
} from '../../../generated/AccessControlManager/AccessControlManger';
import { GRANTED, REVOKED } from '../../../src/constants';
import {
handlePermissionGranted,
handlePermissionRevoked,
} from '../../src/mappings/accessControlManager';
import { getPermissionId } from '../../src/utilities/ids';
import { mockContractAddress, mockFunctionSig, user1 } from '../common/constants';
import { createPermission } from '../common/events';
} from '../../../src/mappings/accessControlManager';
import { getPermissionId } from '../../../src/utilities/ids';
import { mockContractAddress, mockFunctionSig, user1 } from '../../common/constants';
import { createPermission } from '../../common/events';

const cleanup = (): void => {
clearStore();
Expand Down

0 comments on commit 06ba6b2

Please sign in to comment.