Skip to content

Commit

Permalink
refactor(pods): remove comments and mockvalues
Browse files Browse the repository at this point in the history
  • Loading branch information
mmackz committed Jun 12, 2024
1 parent 92af08a commit 1b7f211
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 50 deletions.
28 changes: 15 additions & 13 deletions packages/pods/src/Pods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import {
type MintActionParams,
type MintIntentParams,
} from '@rabbitholegg/questdk-plugin-utils'
import { apply } from '@rabbitholegg/questdk/filter'
import { mintResponseTokenId, mintResponseUndefined } from './mockedValues'
import { apply } from '@rabbitholegg/questdk'
import { type Address, parseEther } from 'viem'
import { describe, expect, test, vi } from 'vitest'
import { getMintIntent, mint } from './Pods'
// import { getFees, simulateMint } from './Pods'
import { failingTestCases, passingTestCases } from './test-setup'
import { EXPECTED_ENCODED_DATA_1155 } from './test-transactions'

Expand Down Expand Up @@ -115,10 +113,6 @@ describe('Given the getFee function', () => {
expect(getFeesSpy).toHaveBeenCalledWith(mintParams)
expect(fee.projectFee).toEqual(parseEther('0'))
expect(fee.actionFee).toEqual(parseEther('0.0007'))

// const { actionFee, projectFee } = await getFees(mintParams)
// expect(actionFee).equals(parseEther('0'))
// expect(projectFee).equals(parseEther('0.0007'))
})
})

Expand All @@ -140,7 +134,13 @@ describe('simulateMint function', () => {
_mint: MintIntentParams,
_value: bigint,
_address: Address,
) => mintResponseTokenId,
) => ({
request: {
address: '0x36cb061f9655368ebae79127c0e8bd34fd5a89c2',
functionName: 'mint',
value: 700000000000000n,
},
}),
}
const simulateMintSpy = vi.spyOn(mockFns, 'simulateMint')
const result = await mockFns.simulateMint(
Expand All @@ -154,8 +154,6 @@ describe('simulateMint function', () => {
address,
)

// const result = await simulateMint(mint, value, address)

const request = result.request
expect(request.address).toBe(mint.contractAddress)
expect(request.value).toBe(value)
Expand All @@ -177,7 +175,13 @@ describe('simulateMint function', () => {
_mint: MintIntentParams,
_value: bigint,
_address: Address,
) => mintResponseUndefined,
) => ({
request: {
address: '0x7e0b40af1d6f26f2141b90170c513e57b5edd74e',
functionName: 'mint',
value: 700000000000000n,
},
}),
}
const simulateMintSpy = vi.spyOn(mockFns, 'simulateMint')
const result = await mockFns.simulateMint(
Expand All @@ -191,8 +195,6 @@ describe('simulateMint function', () => {
address,
)

// const result = await simulateMint(mint as MintIntentParams, value, address)

const request = result.request
expect(request.address).toBe('0x7e0b40af1d6f26f2141b90170c513e57b5edd74e')
expect(request.functionName).toBe('mint')
Expand Down
37 changes: 0 additions & 37 deletions packages/pods/src/mockedValues.ts

This file was deleted.

0 comments on commit 1b7f211

Please sign in to comment.