From be4e9119eb14836f3b43ab6d2104adf3a53a4156 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Fri, 13 Dec 2024 19:06:53 +0400 Subject: [PATCH 1/2] Update tests --- cadence/tests/Recipe_test.cdc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cadence/tests/Recipe_test.cdc b/cadence/tests/Recipe_test.cdc index 986e8fe..a9bff55 100644 --- a/cadence/tests/Recipe_test.cdc +++ b/cadence/tests/Recipe_test.cdc @@ -1,6 +1,18 @@ import Test +access(all) +fun setup() { + let err = Test.deployContract( + name: "Recipe", + path: "../contracts/Recipe.cdc", + arguments: [], + ) + + Test.expect(err, Test.beNil()) +} + + access(all) fun testExample() { let array = [1, 2, 3] Test.expect(array.length, Test.equal(3)) -} +} \ No newline at end of file From db96a4e5789b109bf86d381d844b4be98024adcd Mon Sep 17 00:00:00 2001 From: Jerome P Date: Thu, 19 Dec 2024 15:35:01 -0800 Subject: [PATCH 2/2] Fix failing test suite --- cadence/tests/Recipe_test.cdc | 2 +- flow.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cadence/tests/Recipe_test.cdc b/cadence/tests/Recipe_test.cdc index a9bff55..5618856 100644 --- a/cadence/tests/Recipe_test.cdc +++ b/cadence/tests/Recipe_test.cdc @@ -3,7 +3,7 @@ import Test access(all) fun setup() { let err = Test.deployContract( - name: "Recipe", + name: "ExampleToken", path: "../contracts/Recipe.cdc", arguments: [], ) diff --git a/flow.json b/flow.json index 3d1d7cb..a9ca14d 100644 --- a/flow.json +++ b/flow.json @@ -3,7 +3,8 @@ "ExampleToken": { "source": "./cadence/contracts/Recipe.cdc", "aliases": { - "emulator": "f8d6e0586b0a20c7" + "emulator": "f8d6e0586b0a20c7", + "testing": "0000000000000007" } } },