ArduinoFake icon indicating copy to clipboard operation
ArduinoFake copied to clipboard

Running mocks on device

Open nstansbury opened this issue 2 years ago • 2 comments

Is it possible to use the FakeIt impl. built by ArduinoFake to run mocks on the device? Otherwise it seems you need to install and build FakeIt separately to get on device mocks. Either that or a way to prevent ArduinoFake reimplementing <Arduino.h>

nstansbury avatar Sep 22 '23 12:09 nstansbury

You trying to run the tests with ArduinoFake on a dev board ? This is mean to run on native platform (your desktop or ci)

FabioBatSilva avatar Sep 22 '23 18:09 FabioBatSilva

Yes, I want to Spy on some class function calls when running tests on the actual device, and am trying to avoid having to build and configure FakeIt directly, as all that hardwork is already done by ArduinoFake.

I think the only solution I have found so far is to add ArduinoFake into my [env:pico] and then disable lib-compat-mode to force PlatformIO to include it when building for the device.

nstansbury avatar Sep 23 '23 08:09 nstansbury