I am in the process updating one of my projects (https://github.com/bwmx/randomness-beacon/tree/upgrade-puya-ts) to the latest puya-ts version. Everything has went well and it was relatively painless (migration guide useful, but still certainly missing a few useful bits of info about structs/types).
Now everything builds, and the output is as expected. My e2e tests against localnet all pass successfully, but the algorand-typescript-testing tests fail:
Unknown contract: smart_contracts/randomness_beacon/contract.algo.ts::RandomnessBeacon
contract.algo.spec.ts:166 contracts/example-caller.algo.ts cannot complete arc4.abiCall even when running in algorand-typescript-testing environment correctly with ApplicationSpy hooked methods.
You can read more here: https://github.com/algorandfoundation/algorand-typescript-testing/blob/33ed9bd80ac1db11c35ef685e29078663bc7ee0c/docs/tg-application-spy.md#L5
In previous versions of puya-ts, these tests would have passed no problem, but now it seems like created/emulated applications in the emulated ledger are inaccessible to calling apps.
I don’t think any of us have much experience with this library, but although e2e tests are sufficient, quick unit tests of course make the experience much better, but beyond testing basic apps we need to use this ApplicationSpy class to properly catch/mock other app calls.
If anyone wants to take a look, you can quickly replicate by doing below (to clone my repo and test it):
git clone -b upgrade-puya-ts https://github.com/bwmx/randomness-beacon
cd projects/randomness-beacon && npm install
npm run test
You will see the can call createRequest test will fail as described above. If anyone has any ideas or experience please do share. It would be good to get some dialogue with the dev team behind it, I feel like whatever issues are going on could be fixed easily (anything outside the basics is a battle, or maybe I'm using it with the wrong intents)