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!
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!
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.
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!
Thankyou, this had me fcked for ages
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!
You could also go for
anchor test --skip-local-validator
thx for posting appreciate it ran into the same issues XD
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.
man, saved my life!