fix tests: do not throw exception on empty extension if in headless or unit-tests...