DEV Community

Discussion on: The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

Collapse
 
alfonzomillions profile image
Alfonzo

Great post!

One thing though in the 1st test, you will need to declare the variable "_baseAccount" before you can assign it.

just add "let _baseAccount" in the describe test block.

Also I had to turn off the solana-test-validator for the tests to pass for some reason. Just thought I'd post just incase anyone ran into a similar issue!

Collapse
 
mrslappy profile image
mrslappy

Thankyou, this had me fcked for ages

Collapse
 
breadandwater profile image
Adrian Paniagua Sanchez

You man made my day! Thanks a lot, I was trying to figure out why the tests are getting errors and errors... Adding this line of code and also stopping the solana-test-validator made my test work! Thanks!

Collapse
 
saxenism profile image
Rahul Saxena

You could also go for anchor test --skip-local-validator

Collapse
 
3lii06 profile image
Ali ₿

thx for posting appreciate it ran into the same issues XD

Collapse
 
danmt profile image
Daniel Marin

I believe this happens because Anchor tests spin up a test validator instance. I know somewhere in the Anchor tutorial docs it's explained. Just make sure to turn off the test validator when running the test suite and you should be ready to go.

Collapse
 
marcinkozuchowski profile image
Marcin Kożuchowski

man, saved my life!