Skip to content

Commit 21328e1

Browse files
committed
chore: nix fmt
Signed-off-by: Eric Hegnes <[email protected]>
1 parent eb7c7d2 commit 21328e1

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

ts-sdk/test/evm/fungible-asset-order.test.ts

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert, describe, it, expect } from "@effect/vitest"
1+
import { assert, describe, it } from "@effect/vitest"
22
// TODO: fix mocking instancing
33
import { vi } from "vitest"
44
import { type Context, Effect, Exit, Layer } from "effect"
@@ -12,12 +12,11 @@ import {
1212
createCosmosToEvmFungibleAssetOrder,
1313
createCosmosToCosmosFungibleAssetOrder
1414
} from "../../src/ucs03/fungible-asset-order.js"
15-
import { toHex } from "viem"
1615
import { ensureHex } from "@unionlabs/sdk/utils/index"
1716

18-
vi.mock('../../src/graphql/unwrapped-quote-token.js', async (importOriginal) => {
17+
vi.mock("../../src/graphql/unwrapped-quote-token.js", async importOriginal => {
1918
return {
20-
...await importOriginal<typeof import('../../src/graphql/unwrapped-quote-token.js')>(),
19+
...(await importOriginal<typeof import("../../src/graphql/unwrapped-quote-token.js")>()),
2120
graphqlQuoteTokenUnwrapQuery: () => Effect.succeed("0x12345")
2221
}
2322
})
@@ -100,7 +99,7 @@ const evmIntent = {
10099
baseAmount: 1000000000000000000n, // 1 token with 18 decimals
101100
quoteAmount: 500000000000000000n, // 0.5 token with 18 decimals
102101
sourceChainId: "chainId",
103-
sourceChannelId: 999,
102+
sourceChannelId: 999
104103
} as const
105104

106105
const cosmosIntent = {
@@ -110,7 +109,7 @@ const cosmosIntent = {
110109
baseAmount: BigInt(1000000), // 1 token with 6 decimals
111110
quoteAmount: BigInt(500000), // 0.5 token with 6 decimals
112111
sourceChainId: "chainId",
113-
sourceChannelId: 999,
112+
sourceChannelId: 999
114113
} as const
115114

116115
const EvmToEvm = Layer.mergeAll(
@@ -282,14 +281,18 @@ describe("Fungible Asset Order Tests", () => {
282281

283282
describe("Error handling", () => {
284283
it.layer(EvmToEvmError)(it => {
285-
it.effect("should handle errors when creating EVM to EVM fungible asset order with invalid input", () =>
286-
Effect.gen(function* () {
287-
const result = yield* Effect.exit(createEvmToEvmFungibleAssetOrder({
288-
...evmIntent,
289-
sender: "nonHexSender"
290-
} as unknown as any))
291-
assert.isTrue(Exit.isFailure(result))
292-
})
284+
it.effect(
285+
"should handle errors when creating EVM to EVM fungible asset order with invalid input",
286+
() =>
287+
Effect.gen(function* () {
288+
const result = yield* Effect.exit(
289+
createEvmToEvmFungibleAssetOrder({
290+
...evmIntent,
291+
sender: "nonHexSender"
292+
} as unknown as any)
293+
)
294+
assert.isTrue(Exit.isFailure(result))
295+
})
293296
)
294297
})
295298

0 commit comments

Comments
 (0)