@onflow/flow-js-testing
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/onflow__flow-js-testing package

0.5.0 • Public • Published
Logo

Test your Flow applications written in Cadence with ease
Read the docs

Report Bug · Contribute · Installation

JavaScript Testing Framework for Flow Network

This repository contains utility methods which, in conjunction with testing libraries like Jest, can be used to speed up your productivity while building Flow dapps with Cadence.

Requirements

Node

We are assuming you are using this framework under Node environment. You will need at least version 12.0.0

Emulator

Most of the methods will not work, unless you have Flow Emulator running in the background. You can install it alongside Flow CLI. Please refer to Install Flow CLI for instructions.

If you have it already installed, run the flow init in your terminal to create flow.json config file in the root directory of your tests.

In order to use the emulator within your tests, please refer to the documentation.

Playground Integration

Every Playground project has the ability to export it's content as a set of files with Cadence template code and basic test environment "out of the box".

If you want to use this functionality:

  • Press "Export" button in the top right corner
  • Pick the name of the project - or keep auto-generated version
  • Press "Export" button within popup window

Playground will create a zip file for you, which you can save wherever you like.

Readme

Keywords

Package Sidebar

Install

npm i @onflow/flow-js-testing

Weekly Downloads

41

Version

0.5.0

License

Apache-2.0

Unpacked Size

1.38 MB

Total Files

162

Last publish

Collaborators

  • bthaile
  • jribbink
  • nialexsan
  • bakii_agl
  • han210
  • gregorggg
  • chasefleming
  • dapperj
  • gregsantos
  • derrickpelletier
  • dapper_labs
  • jeffreydoyle
  • harry.eth
  • turbolent_flow