Skip to content

Type mismatch when working solana-bankrun #17

@heyAyushh

Description

@heyAyushh

Error:

Argument of type 'import("/program-examples/basics/account-data/anchor/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/solana-bankrun/dist/index").ProgramTestContext'

is not assignable to parameter of type 

'import("/program-examples/basics/account-data/anchor/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/solana-bankrun/dist/index").ProgramTestContext'.
 
Types have separate declarations of a private property 'inner'.

Steps to reproduce

import { BankrunProvider } from "anchor-bankrun";
import { PublicKey } from '@solana/web3.js';
import { it, describe } from "node:test"

const IDL = require("../target/idl/anchor_program_example.json");
const PROGRAM_ID = new PublicKey(IDL.address);

describe('Account Data!', async () => {
  const context = await startAnchor("", [{name: "anchor_program_example", programId: PROGRAM_ID}], []);
  const provider = new BankrunProvider(context);
                                        ^^^^^^
                                         error here
  "dependencies": {
    "@coral-xyz/anchor": "^0.30.0",
    "@solana/web3.js": "^1.95.2",
    "anchor-bankrun": "^0.4.0",
    "solana-bankrun": "^0.3.0"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions