Init Framework
For Framework to operate properly you need to initialize it first.
You can do it with provided init method.
init( basePath, options)​
Initializes framework variables.
Arguments​
| Name | Type | Optional | Description | 
|---|---|---|---|
| basePath | string | path to the folder holding all Cadence template files | |
| options | object | ✅ | options object to use during initialization | 
Options​
| Name | Type | Optional | Description | 
|---|---|---|---|
| pkey | ✅ | private key for service account | 
Usage​
_12import path from "path"_12import {init} from "@onflow/flow-js-testing"_12_12describe("test setup", () => {_12  beforeEach(async () => {_12    const basePath = path.resolve(__dirname, "../cadence")_12    await init(basePath)_12_12    // alternatively you can pass specific port_12    // await init(basePath, {port: 8085})_12  })_12})