Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Run mocha tests by npm scripts & Remove Gruntfile.js - Closes #2935 #3078

Merged
merged 32 commits into from
Mar 18, 2019

Conversation

yatki
Copy link
Contributor

@yatki yatki commented Mar 14, 2019

What was the problem?

After introducing jest to our codebase, we had 2 test runners which had different api to be executed.

How did I fix it?

  • I unified the way we execute tests.
  • Removed Gruntfile.js
  • Refactor new_migration.js file to remove grunt dependency
  • Removed grunt from package.json
  • Refactored Jenkinsfiles
  • Updated Readme

How to test it?

Please see: https://github.com/LiskHQ/lisk/blob/e06f5c121eef27a13874a48bfc5ca19052d1590e/README.md#running-mocha-tests

Review checklist

@yatki yatki self-assigned this Mar 14, 2019
@yatki yatki force-pushed the 2935-remove-gruntfile branch 3 times, most recently from 5f08160 to 44e6399 Compare March 14, 2019 16:26
Jenkinsfile.network Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
@yatki yatki requested a review from lsilvs March 15, 2019 15:15
fchavant
fchavant previously approved these changes Mar 15, 2019
Copy link
Contributor

@lsilvs lsilvs left a comment

Choose a reason for hiding this comment

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

If I start functional tests I can't stop them

How to reproduce:
npm run mocha:functional -- --grep "@slow|@unstable" --invert
Try to exit (control + c) before it finish

@yatki yatki requested a review from lsilvs March 15, 2019 16:58
@yatki
Copy link
Contributor Author

yatki commented Mar 15, 2019

@lsilvs That's because functional tests also spawn child processes. Unfortunately, it's not related to lisk mocha runner, we need to update the functional tests accordingly.

@yatki yatki requested review from fchavant and removed request for fchavant March 15, 2019 17:00
@yatki
Copy link
Contributor Author

yatki commented Mar 18, 2019

@lsilvs #3098 was created for functional tests issue.

@shuse2
Copy link
Collaborator

shuse2 commented Mar 18, 2019

npm t unit
Error code seems to fail stringifying.

([object Object]):      framework/test/mocha/unit/components/cache/cache.js
([object Object]):      framework/test/mocha/unit/components/storage/entities/account.js
([object Object]):      framework/test/mocha/unit/components/storage/entities/block.js
([object Object]):      framework/test/mocha/unit/components/storage/entities/transaction.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/account.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/block.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/migration.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/peer.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/round.js
([object Object]):      framework/test/mocha/unit/modules/chain/components/storage/entitites/transaction.js

package.json Outdated Show resolved Hide resolved
lsilvs
lsilvs previously approved these changes Mar 18, 2019
Copy link
Contributor

@lsilvs lsilvs left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run mocha tests by npm scripts & Remove Gruntfile.js
6 participants