Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script to test polkadot.js/api functions #1336

Merged
merged 3 commits into from
Jan 28, 2021
Merged

Conversation

edwardmack
Copy link
Member

Changes

  • This adds Node.js javascript test script for testing polkadot.js/api. It calls polkadot.js/api functions and displays output to console.

Tests

Install polkadot.js/api package (assuming you already have node.js and npm installed).

cd tests/polkadotjs_test/
npm install

Start building blocks with gossamer node. Then run script (from within tests/polkadotjs_test/).

node test.js

Observe the console output for results or errors.

Checklist

  • I have read CODE_OF_CONDUCT and CONTRIBUTING
  • I have provided as much information as possible and necessary
  • I have reviewed my own pull request before requesting a review
  • All integration tests and required coverage checks are passing

Issues

Copy link
Contributor

@RyRy79261 RyRy79261 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, could use the code to create a dashboard later on

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff! @dutterbutter can we get this added to CI somehow?

@dutterbutter
Copy link
Contributor

great stuff! @dutterbutter can we get this added to CI somehow?

@noot absolutely! Will be added with #1228

@arijitAD
Copy link
Contributor

Screenshot 2021-01-27 at 9 58 41 PM

I ran this against the substrate node. It errors out. Can you check this?

@edwardmack edwardmack merged commit 473f090 into development Jan 28, 2021
@edwardmack edwardmack deleted the ed/test_polkadotjs branch January 28, 2021 21:39
github-actions bot pushed a commit that referenced this pull request Jan 28, 2021
Edward Mack: add basic node.js test for polkadot.js/api (#1336)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create set of Polkadot.js test scripts
6 participants