UNPKG

@hirosystems/clarinet-sdk

Version:

A SDK to interact with Clarity Smart Contracts in node.js

29 lines (22 loc) 1.01 kB
import type { Assertion, AsymmetricMatchersContaining, ExpectStatic } from "vitest"; import type { ClarityType, ClarityValue } from "@stacks/transactions"; interface ClarityValuesMatchers<R = unknown> { toHaveClarityType(expectedType: ClarityType): R; toBeOk(expected: ExpectStatic | ClarityValue): R; toBeErr(expected: ExpectStatic | ClarityValue): R; toBeSome(expected: ExpectStatic | ClarityValue): R; toBeNone(): R; toBeBool(expected: boolean): R; toBeInt(rexpected: number | bigint): R; toBeUint(expected: number | bigint): R; toBeAscii(expected: string): R; toBeUtf8(expected: string): R; toBePrincipal(expected: string): R; toBeBuff(expected: Uint8Array): R; toBeList(expected: ExpectStatic[] | ClarityValue[]): R; toBeTuple(expected: Record<string, ExpectStatic | ClarityValue>): R; } declare module "vitest" { interface Assertion<T = any> extends ClarityValuesMatchers<T> {} interface AsymmetricMatchersContaining extends ClarityValuesMatchers<ExpectStatic> {} }