Skip to content

Commit

Permalink
Added setup method to pull in Recipe into test execution
Browse files Browse the repository at this point in the history
Updated flow.json to denote the deployed address for testing context
  • Loading branch information
franklywatson committed Dec 12, 2024
1 parent c17bf82 commit 18eb9ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions cadence/tests/Recipe_test.cdc
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import Test
import "test_helpers.cdc"

access(all)
fun setup() {
let err = Test.deployContract(
name: "NFTStorefront",
path: "../contracts/Recipe.cdc",
arguments: [],
)

Test.expect(err, Test.beNil())
}

access(all) fun testExample() {
let array = [1, 2, 3]
Expand Down
5 changes: 3 additions & 2 deletions flow.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"contracts": {
"NFTStorefront": {
"source": "./cadence/contracts/Recipe.cdc",
"source": "cadence/contracts/Recipe.cdc",
"aliases": {
"emulator": "f8d6e0586b0a20c7"
"emulator": "f8d6e0586b0a20c7",
"testing": "0000000000000007"
}
}
},
Expand Down

0 comments on commit 18eb9ae

Please sign in to comment.