Issue #1928786 by iva2k, arthurf: adds a new reset to source option with tests, abstracts the tests to make it easier to test functionality'