However, that is quite inefficient. With #27, we're starting to do quite a bit of prep work in ensureDevice(), like installing WireGuard. It's pretty silly to do that only to then immediately reset the emulator to a snapshot (which itself will call ensureDevice()).
But you can't just skip the first ensureDevice() call either since we do want to assert that the device is ready. Maybe we want to add a prepare: boolean parameter that defaults to true?
If you want to use an emulator, you would typically first call
ensureDevice()
and thenresetDevice()
, just like we do in the example:https://github.com/tweaselORG/appstraction/blob/63a1c8ca1d1a25384c9e25a285042b7d95f841c1/examples/android-emulator.ts#L17-L18
However, that is quite inefficient. With #27, we're starting to do quite a bit of prep work in
ensureDevice()
, like installing WireGuard. It's pretty silly to do that only to then immediately reset the emulator to a snapshot (which itself will callensureDevice()
).But you can't just skip the first
ensureDevice()
call either since we do want to assert that the device is ready. Maybe we want to add aprepare: boolean
parameter that defaults totrue
?