Init Testing Environment
Bootstrap your testing environment with a single command:
_10npx flow-js-testing init
When you run this command in the terminal it will initiate npm package in your current directory and create
Then it will install dependencies. After the installation is finished, the utility will create the required config files for Babel, Jest and Flow CLI.
⚠️ Warning: This command will overwrite
flow.jsonfiles in the folder, where it would be executed and also could affect your
package.jsonfile. That's why we advise you to use new empty folder to contain your Cadence related tests.
Generate New Test Suite
Create a test suite file for your project with all necessary imports and setup for describe blocks. You can start writing your asserts and expectations right away:
_10npx flow-js-testing make [name]
|Exclude comments from test suit code|
|Specify base path to Cadence folder|
If you do not specify
name as second argument, the tool will give your file a unique name.