Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mismatch when working solana-bankrun #17

Open
heyAyushh opened this issue Aug 4, 2024 · 0 comments
Open

Type mismatch when working solana-bankrun #17

heyAyushh opened this issue Aug 4, 2024 · 0 comments

Comments

@heyAyushh
Copy link

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"
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant