def METHOD_NAME(app_dir: Path, reinstall=True, regen_vectors=True):
    subprocess.check_call(["npm", "install"], cwd=tests_directory)
    if regen_vectors:
        # make sure the genesis is up-to-date
        rebuild_genesis_data()
    subprocess.check_call(["npm", "run", "build"], cwd=tests_directory)
    if reinstall:
        subprocess.call(
            ["cordova", "plugin", "rm", "wallet-cordova-plugin-tests"], cwd=app_dir
        )
    subprocess.check_call(
        ["cordova", "plugin", "add", str(tests_directory)], cwd=app_dir
    )