From 4a8165b13dde1b85e3ab77676d94f732d7f5ad4c Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Thu, 19 Dec 2024 11:23:10 -0700 Subject: [PATCH] await get actor --- .../test/property/candid_rpc/blob/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/bool/test/generate_tests.ts | 2 +- .../http_request_update/test/generate_tests.ts | 4 ++-- .../candid_rpc/canister_methods/init/test/generate_tests.ts | 2 +- .../canister_methods/inspect_message/test/generate_tests.ts | 2 +- .../canister_methods/query/test/generate_tests.ts | 2 +- .../canister_methods/update/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/float32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/float64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/func/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int16/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int8/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat16/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat8/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/null/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/opt/test/generate_tests.ts | 2 +- .../property/candid_rpc/principal/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/record/test/generate_tests.ts | 2 +- .../property/candid_rpc/recursive/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/text/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/tuple/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/variant/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/vec/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/blob/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/bool/test/generate_tests.ts | 2 +- .../http_request_update/test/generate_tests.ts | 4 ++-- .../candid_rpc/canister_methods/init/test/generate_tests.ts | 2 +- .../canister_methods/inspect_message/test/generate_tests.ts | 2 +- .../canister_methods/query/test/generate_tests.ts | 2 +- .../canister_methods/update/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/float32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/float64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/func/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int16/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/int8/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat16/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat32/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat64/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/nat8/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/null/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/opt/test/generate_tests.ts | 2 +- .../property/candid_rpc/principal/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/record/test/generate_tests.ts | 2 +- .../property/candid_rpc/recursive/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/text/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/tuple/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/variant/test/generate_tests.ts | 2 +- .../test/property/candid_rpc/vec/test/generate_tests.ts | 2 +- test/get_canister_actor.ts | 6 ------ 59 files changed, 60 insertions(+), 66 deletions(-) diff --git a/examples/experimental/test/property/candid_rpc/blob/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/blob/test/generate_tests.ts index 486dfabddd..4d2d17aef4 100644 --- a/examples/experimental/test/property/candid_rpc/blob/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/blob/test/generate_tests.ts @@ -21,7 +21,7 @@ export function generateTests( { name: `blob ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...paramBlobs.map( diff --git a/examples/experimental/test/property/candid_rpc/bool/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/bool/test/generate_tests.ts index f502a7d3d1..7f0a73a99f 100644 --- a/examples/experimental/test/property/candid_rpc/bool/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/bool/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `bool ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts index 7b0a90a19b..597741596a 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: 'get state before calling http_request', test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor['get_state'](); @@ -62,7 +62,7 @@ export function generateTests( { name: 'get state after calling http_request', test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor['get_state'](); diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts index 7cc3865499..5cde0888b6 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts @@ -17,7 +17,7 @@ export function generateTests( { name: `init method`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor.getInitValues(); return testEquality(result, expectedResult); diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts index ddfeb1baf2..7502996ae5 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts @@ -43,7 +43,7 @@ function generateTest( name: `method "${functionName}" expected ${behavior}`, test: async (): Promise => { await agent.fetchRootKey(); - const actor = getActor(__dirname, agent); + const actor = await getActor(__dirname, agent); try { const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts index 3f03f5b327..5ac5f31add 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `query method "${functionName}"`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); return testEquality(result, expectedResult); } diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts index f822f5fefe..6720c4c77f 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `update method "${functionName}"`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); return testEquality(result, expectedResult); diff --git a/examples/experimental/test/property/candid_rpc/float32/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/float32/test/generate_tests.ts index 8d06ffb8c1..ab28fd4159 100644 --- a/examples/experimental/test/property/candid_rpc/float32/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/float32/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `float32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/float64/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/float64/test/generate_tests.ts index a1b96c9d69..0bb2db14e0 100644 --- a/examples/experimental/test/property/candid_rpc/float64/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/float64/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `float64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/func/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/func/test/generate_tests.ts index 6f43b31d48..0d2cf20228 100644 --- a/examples/experimental/test/property/candid_rpc/func/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/func/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `func ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamFuncs.map( diff --git a/examples/experimental/test/property/candid_rpc/int/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/int/test/generate_tests.ts index d371cab3d8..22f52c4c50 100644 --- a/examples/experimental/test/property/candid_rpc/int/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/int/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `int ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/int16/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/int16/test/generate_tests.ts index ca7736f384..c5e5f9b20b 100644 --- a/examples/experimental/test/property/candid_rpc/int16/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/int16/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `int16 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/int32/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/int32/test/generate_tests.ts index aca24d4e9e..5a500004c9 100644 --- a/examples/experimental/test/property/candid_rpc/int32/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/int32/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `int32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/int64/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/int64/test/generate_tests.ts index d4c9ee1e05..ade85e0c06 100644 --- a/examples/experimental/test/property/candid_rpc/int64/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/int64/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `int64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/int8/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/int8/test/generate_tests.ts index 2895ddb7b8..6033e52f41 100644 --- a/examples/experimental/test/property/candid_rpc/int8/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/int8/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `test ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/nat/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/nat/test/generate_tests.ts index 88de4ee05b..5bb7c56794 100644 --- a/examples/experimental/test/property/candid_rpc/nat/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/nat/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `nat ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/nat16/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/nat16/test/generate_tests.ts index 8830422ece..ecca58df70 100644 --- a/examples/experimental/test/property/candid_rpc/nat16/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/nat16/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat16 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/nat32/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/nat32/test/generate_tests.ts index cb3c408713..a535493371 100644 --- a/examples/experimental/test/property/candid_rpc/nat32/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/nat32/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/nat64/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/nat64/test/generate_tests.ts index 0c1b787e13..fbd38252d4 100644 --- a/examples/experimental/test/property/candid_rpc/nat64/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/nat64/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `nat64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/nat8/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/nat8/test/generate_tests.ts index 00b271b245..f174bd5e2d 100644 --- a/examples/experimental/test/property/candid_rpc/nat8/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/nat8/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat8 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/null/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/null/test/generate_tests.ts index b768bdc13a..57944c1b50 100644 --- a/examples/experimental/test/property/candid_rpc/null/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/null/test/generate_tests.ts @@ -12,7 +12,7 @@ export function generateTests( { name: `test ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamNulls.map( diff --git a/examples/experimental/test/property/candid_rpc/opt/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/opt/test/generate_tests.ts index 8061de7166..9ff9e2ecdd 100644 --- a/examples/experimental/test/property/candid_rpc/opt/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/opt/test/generate_tests.ts @@ -15,7 +15,7 @@ export function generateTests( { name: `opt ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamOpts.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/experimental/test/property/candid_rpc/principal/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/principal/test/generate_tests.ts index fad105f8fb..33707ce3f9 100644 --- a/examples/experimental/test/property/candid_rpc/principal/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/principal/test/generate_tests.ts @@ -18,7 +18,7 @@ export function generateTests( { name: `principal ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamPrincipals.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/experimental/test/property/candid_rpc/record/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/record/test/generate_tests.ts index dbcbc2348a..aba1af3919 100644 --- a/examples/experimental/test/property/candid_rpc/record/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/record/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `record ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamRecords.map( diff --git a/examples/experimental/test/property/candid_rpc/recursive/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/recursive/test/generate_tests.ts index f051ae2125..7b7d82fb7a 100644 --- a/examples/experimental/test/property/candid_rpc/recursive/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/recursive/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `recursive ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamRecursive.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/experimental/test/property/candid_rpc/text/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/text/test/generate_tests.ts index 864fad0251..50693f97c9 100644 --- a/examples/experimental/test/property/candid_rpc/text/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/text/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `text ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/experimental/test/property/candid_rpc/tuple/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/tuple/test/generate_tests.ts index 387be4ae21..2b2fa75e24 100644 --- a/examples/experimental/test/property/candid_rpc/tuple/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/tuple/test/generate_tests.ts @@ -18,7 +18,7 @@ export function generateTests( { name: `tuple ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamTuples.map( diff --git a/examples/experimental/test/property/candid_rpc/variant/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/variant/test/generate_tests.ts index 540ee8ead8..7aea8d7578 100644 --- a/examples/experimental/test/property/candid_rpc/variant/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/variant/test/generate_tests.ts @@ -15,7 +15,7 @@ export function generateTests( { name: `variant ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamVariants.map( diff --git a/examples/experimental/test/property/candid_rpc/vec/test/generate_tests.ts b/examples/experimental/test/property/candid_rpc/vec/test/generate_tests.ts index 682face3fd..0698290527 100644 --- a/examples/experimental/test/property/candid_rpc/vec/test/generate_tests.ts +++ b/examples/experimental/test/property/candid_rpc/vec/test/generate_tests.ts @@ -14,7 +14,7 @@ export function generateTests( { name: `vec ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamVecs.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/stable/test/property/candid_rpc/blob/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/blob/test/generate_tests.ts index 486dfabddd..4d2d17aef4 100644 --- a/examples/stable/test/property/candid_rpc/blob/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/blob/test/generate_tests.ts @@ -21,7 +21,7 @@ export function generateTests( { name: `blob ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...paramBlobs.map( diff --git a/examples/stable/test/property/candid_rpc/bool/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/bool/test/generate_tests.ts index f502a7d3d1..7f0a73a99f 100644 --- a/examples/stable/test/property/candid_rpc/bool/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/bool/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `bool ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts index 7b0a90a19b..597741596a 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/http_request_update/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: 'get state before calling http_request', test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor['get_state'](); @@ -62,7 +62,7 @@ export function generateTests( { name: 'get state after calling http_request', test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor['get_state'](); diff --git a/examples/stable/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts index 7cc3865499..5cde0888b6 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/init/test/generate_tests.ts @@ -17,7 +17,7 @@ export function generateTests( { name: `init method`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor.getInitValues(); return testEquality(result, expectedResult); diff --git a/examples/stable/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts index ddfeb1baf2..7502996ae5 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/inspect_message/test/generate_tests.ts @@ -43,7 +43,7 @@ function generateTest( name: `method "${functionName}" expected ${behavior}`, test: async (): Promise => { await agent.fetchRootKey(); - const actor = getActor(__dirname, agent); + const actor = await getActor(__dirname, agent); try { const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts index 3f03f5b327..5ac5f31add 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/query/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `query method "${functionName}"`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); return testEquality(result, expectedResult); } diff --git a/examples/stable/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts index f822f5fefe..6720c4c77f 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/update/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `update method "${functionName}"`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); return testEquality(result, expectedResult); diff --git a/examples/stable/test/property/candid_rpc/float32/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/float32/test/generate_tests.ts index 8d06ffb8c1..ab28fd4159 100644 --- a/examples/stable/test/property/candid_rpc/float32/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/float32/test/generate_tests.ts @@ -19,7 +19,7 @@ export function generateTests( { name: `float32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/float64/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/float64/test/generate_tests.ts index a1b96c9d69..0bb2db14e0 100644 --- a/examples/stable/test/property/candid_rpc/float64/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/float64/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `float64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/func/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/func/test/generate_tests.ts index 6f43b31d48..0d2cf20228 100644 --- a/examples/stable/test/property/candid_rpc/func/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/func/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `func ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamFuncs.map( diff --git a/examples/stable/test/property/candid_rpc/int/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/int/test/generate_tests.ts index d371cab3d8..22f52c4c50 100644 --- a/examples/stable/test/property/candid_rpc/int/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/int/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `int ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/int16/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/int16/test/generate_tests.ts index ca7736f384..c5e5f9b20b 100644 --- a/examples/stable/test/property/candid_rpc/int16/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/int16/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `int16 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/int32/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/int32/test/generate_tests.ts index aca24d4e9e..5a500004c9 100644 --- a/examples/stable/test/property/candid_rpc/int32/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/int32/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `int32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/int64/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/int64/test/generate_tests.ts index d4c9ee1e05..ade85e0c06 100644 --- a/examples/stable/test/property/candid_rpc/int64/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/int64/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `int64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/int8/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/int8/test/generate_tests.ts index 2895ddb7b8..6033e52f41 100644 --- a/examples/stable/test/property/candid_rpc/int8/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/int8/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `test ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/nat/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/nat/test/generate_tests.ts index 88de4ee05b..5bb7c56794 100644 --- a/examples/stable/test/property/candid_rpc/nat/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/nat/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `nat ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/nat16/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/nat16/test/generate_tests.ts index 8830422ece..ecca58df70 100644 --- a/examples/stable/test/property/candid_rpc/nat16/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/nat16/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat16 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/nat32/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/nat32/test/generate_tests.ts index cb3c408713..a535493371 100644 --- a/examples/stable/test/property/candid_rpc/nat32/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/nat32/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat32 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/nat64/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/nat64/test/generate_tests.ts index 0c1b787e13..fbd38252d4 100644 --- a/examples/stable/test/property/candid_rpc/nat64/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/nat64/test/generate_tests.ts @@ -22,7 +22,7 @@ export function generateTests( { name: `nat64 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/nat8/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/nat8/test/generate_tests.ts index 00b271b245..f174bd5e2d 100644 --- a/examples/stable/test/property/candid_rpc/nat8/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/nat8/test/generate_tests.ts @@ -23,7 +23,7 @@ export function generateTests( { name: `nat8 ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/null/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/null/test/generate_tests.ts index b768bdc13a..57944c1b50 100644 --- a/examples/stable/test/property/candid_rpc/null/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/null/test/generate_tests.ts @@ -12,7 +12,7 @@ export function generateTests( { name: `test ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamNulls.map( diff --git a/examples/stable/test/property/candid_rpc/opt/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/opt/test/generate_tests.ts index 8061de7166..9ff9e2ecdd 100644 --- a/examples/stable/test/property/candid_rpc/opt/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/opt/test/generate_tests.ts @@ -15,7 +15,7 @@ export function generateTests( { name: `opt ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamOpts.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/stable/test/property/candid_rpc/principal/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/principal/test/generate_tests.ts index fad105f8fb..33707ce3f9 100644 --- a/examples/stable/test/property/candid_rpc/principal/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/principal/test/generate_tests.ts @@ -18,7 +18,7 @@ export function generateTests( { name: `principal ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamPrincipals.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/stable/test/property/candid_rpc/record/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/record/test/generate_tests.ts index dbcbc2348a..aba1af3919 100644 --- a/examples/stable/test/property/candid_rpc/record/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/record/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `record ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamRecords.map( diff --git a/examples/stable/test/property/candid_rpc/recursive/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/recursive/test/generate_tests.ts index f051ae2125..7b7d82fb7a 100644 --- a/examples/stable/test/property/candid_rpc/recursive/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/recursive/test/generate_tests.ts @@ -13,7 +13,7 @@ export function generateTests( { name: `recursive ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamRecursive.map( (param) => param.value.value.agentArgumentValue diff --git a/examples/stable/test/property/candid_rpc/text/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/text/test/generate_tests.ts index 864fad0251..50693f97c9 100644 --- a/examples/stable/test/property/candid_rpc/text/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/text/test/generate_tests.ts @@ -20,7 +20,7 @@ export function generateTests( { name: `text ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName](...paramValues); diff --git a/examples/stable/test/property/candid_rpc/tuple/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/tuple/test/generate_tests.ts index 387be4ae21..2b2fa75e24 100644 --- a/examples/stable/test/property/candid_rpc/tuple/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/tuple/test/generate_tests.ts @@ -18,7 +18,7 @@ export function generateTests( { name: `tuple ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamTuples.map( diff --git a/examples/stable/test/property/candid_rpc/variant/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/variant/test/generate_tests.ts index 540ee8ead8..7aea8d7578 100644 --- a/examples/stable/test/property/candid_rpc/variant/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/variant/test/generate_tests.ts @@ -15,7 +15,7 @@ export function generateTests( { name: `variant ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const result = await actor[functionName]( ...namedParamVariants.map( diff --git a/examples/stable/test/property/candid_rpc/vec/test/generate_tests.ts b/examples/stable/test/property/candid_rpc/vec/test/generate_tests.ts index 682face3fd..0698290527 100644 --- a/examples/stable/test/property/candid_rpc/vec/test/generate_tests.ts +++ b/examples/stable/test/property/candid_rpc/vec/test/generate_tests.ts @@ -14,7 +14,7 @@ export function generateTests( { name: `vec ${functionName}`, test: async (): Promise => { - const actor = getActor(__dirname); + const actor = await getActor(__dirname); const params = namedParamVecs.map( (param) => param.value.value.agentArgumentValue diff --git a/test/get_canister_actor.ts b/test/get_canister_actor.ts index 6fe9a12fb2..a0e74735ea 100644 --- a/test/get_canister_actor.ts +++ b/test/get_canister_actor.ts @@ -31,11 +31,5 @@ export async function getCanisterActor( agent }); - if (typeof canisterName === 'string') { - throw new Error( - 'This prop tests uses getCanisterActor and is good to go' - ); - } - return actor; }