Skip to content

Commit

Permalink
ci-skip-rust expect to be true
Browse files Browse the repository at this point in the history
  • Loading branch information
Ad96el committed Feb 19, 2025
1 parent 753148d commit ec881b6
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { describe, beforeEach, it, afterEach } from 'vitest'
import type { KeyringPair } from '@polkadot/keyring/types'
import type { DispatchError } from '@polkadot/types/interfaces'

import { createBlock } from '../../../../network/utils.js'
import { testCases } from './config.js'
Expand All @@ -25,15 +26,13 @@ describe.each(testCases)('Switch KILTs while paused', ({ account, txContext, con

it(desc, async ({ expect }) => {
const { balanceToTransfer, tx } = txContext
let error
let error: DispatchError | undefined

// This should fail.
await tx(senderContext, hexAddress(senderAccount.address), balanceToTransfer.toString()).signAndSend(
senderAccount,
({ dispatchError }) => {
if (dispatchError) {
error = dispatchError
}
error = dispatchError
}
)

Expand All @@ -43,6 +42,6 @@ describe.each(testCases)('Switch KILTs while paused', ({ account, txContext, con
throw new Error('Expected SwitchPairNotEnabled error')
}

expect(senderContext.api.errors.assetSwitchPool1.SwitchPairNotEnabled.is(error))
expect(senderContext.api.errors.assetSwitchPool1.SwitchPairNotEnabled.is(error.asModule)).toBe(true)
})
})

0 comments on commit ec881b6

Please sign in to comment.