From 3724f23b78f969cdc464daa0ca71c7a39dadb3f1 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 8 Jul 2024 09:53:54 -0600 Subject: [PATCH] fixup into prop_tests --- .../inspect_message/test/generate_tests.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/property_tests/tests/canister_methods/inspect_message/test/generate_tests.ts b/property_tests/tests/canister_methods/inspect_message/test/generate_tests.ts index 39922d38b9..b97656bc1a 100644 --- a/property_tests/tests/canister_methods/inspect_message/test/generate_tests.ts +++ b/property_tests/tests/canister_methods/inspect_message/test/generate_tests.ts @@ -1,5 +1,5 @@ import { Agent } from '@dfinity/agent'; -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidReturnType } from 'azle/property_tests/arbitraries/candid/candid_return_type_arb'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { CorrespondingJSType } from 'azle/property_tests/arbitraries/candid/corresponding_js_type'; @@ -48,7 +48,7 @@ function generateTest( const result = await actor[functionName](...paramValues); if (behavior === 'ACCEPT') { - return { Ok: deepEqual(result, expectedResult) }; + return testEquality(result, expectedResult); } return { @@ -64,9 +64,10 @@ function generateTest( if (behavior === 'THROW') { const expectedError = `Method \\"${functionName}\\" not allowed`; - return { - Ok: error.message.includes(expectedError) - }; + return testEquality( + error.message.includes(expectedError), + true + ); } throw error;