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

WIP: e2e tests #2688

Closed
wants to merge 3 commits into from
Closed

WIP: e2e tests #2688

wants to merge 3 commits into from

Conversation

micahriggan
Copy link
Contributor

@micahriggan micahriggan commented Apr 16, 2019

Description

Starting the scaffolding of the e2e tests

Start of the work for #2682

Type of change

  • Enhancement

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no warnings.
  • I have updated or added types for all modules I've changed
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test in the root folder with success and extended the tests if necessary.
  • I ran npm run build in the root folder and tested it in the browser and with node.
  • I ran npm run dtslint in the root folder and tested that all my types are correct
  • I have tested my code on an ethereum test network.

@micahriggan
Copy link
Contributor Author

Originally based this off of the v1.x branch, working on rebasing it off of 1.0

@nivida nivida added Enhancement Includes improvements or optimizations In Progress Currently being worked on labels Apr 16, 2019
@szerintedmi szerintedmi mentioned this pull request Apr 16, 2019
Copy link

@szerintedmi szerintedmi left a comment

Choose a reason for hiding this comment

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

Fantastic! I think web3.js desperately needs this.
Added a few minor comments.
I'm happy to contribute with a few specific tests but we should sync effort this time. :) I was just about to push a similar PR.

@@ -0,0 +1,3 @@
FROM node

Choose a reason for hiding this comment

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

ganache is publishing docker images too: trufflesuite/ganache-cli

const url = protocol + '://' + host + ':' + rpcPort;
return describe('Web3 integration tests for: ' + url, () => {
before(function(done) {
this.timeout(30000);

Choose a reason for hiding this comment

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

Is it waiting for the provider to be ready after container launch?
Wouldn't be better to just wait for the port to be open before start any tests? Here it may still assert if it's connected (e.g. web3.eth.net.isListening() )

@nivida nivida mentioned this pull request Apr 16, 2019
@nivida
Copy link
Contributor

nivida commented Apr 16, 2019

I've closed this PR because of PR #2693

@nivida nivida closed this Apr 16, 2019
@@ -19,6 +19,8 @@
"docs": "cd docs; make html;",
"lint": "jshint *.js packages",
"test": "mocha; jshint *.js packages",
"e2e": "docker-compose down && docker-compose build && docker-compose run --entrypoint 'npm run e2e:mocha' test_runner",
"e2e:mocha": "mocha --recursive ./e2e/**/*.spec.js -R spec --exit",

Choose a reason for hiding this comment

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

I'm not sure of introducing a new testing framework. What's the reason?
I was struggling with the Jest magic in the project but adding yet an other framework might increase package complexity even more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Includes improvements or optimizations In Progress Currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants