Skip to content

Draft: Add `withEmulated` to skip checks that use emulator capabilities when running in real network.

Sandeep.C.R requested to merge sras/add-withEmulated into master

This adds a withEmulated function that one can use to skip some checks, when the test is being run in a real network.

This might be useful because there are some things that are not possible when running the test in a real network. Like moving forward by a large block/time interval. Setting time/level to an arbitrary levels. Setting voting powers etc. So during writing a test, there might be times when we want to add some additional checks, which makes use of these abilities. But right now we might not be able to do it without duplicating the entire test, because such checks will make the test un-runnable on a real network.

Using withEmulated function, it might be possible to include such checks, and safely skip then when the test is run on real network.

I am not sure if this will work. Right now this is a draft PR to just share some relavant changes.

Merge request reports