From b7ac42aecdc798b8cd2c15330ce353914ddf597d Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Wed, 18 Dec 2024 13:18:34 -0700 Subject: [PATCH] add throw to find prop tests that don't use this function --- test/index.ts | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/test/index.ts b/test/index.ts index fecda4c404..32b3235de0 100644 --- a/test/index.ts +++ b/test/index.ts @@ -6,7 +6,6 @@ import { describe, expect, test } from '@jest/globals'; import * as fc from 'fast-check'; import { join } from 'path'; -import { getCanisterId } from '../dfx'; import { execSyncPretty } from '../src/build/stable/utils/exec_sync_pretty'; export { expect } from '@jest/globals'; import { runBenchmarksForCanisters } from './benchmarks'; @@ -120,26 +119,9 @@ type GetCanisterActorOptions = { export async function getCanisterActor( canisterName: string, - options: GetCanisterActorOptions = {} + _options: GetCanisterActorOptions = {} ): Promise> { - const { createActor } = await import( - join(process.cwd(), 'test', 'dfx_generated', canisterName) - ); - - const agent = - options.agent ?? - new HttpAgent({ - host: 'http://127.0.0.1:8000', - identity: options.identity - }); - - if (process.env.DFX_NETWORK !== 'ic') { - await agent.fetchRootKey(); - } - - return createActor(getCanisterId(canisterName), { - agent - }); + throw new Error('This prop tests uses getCanisterActor and is good to go'); } function processEnvVars(): {