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

How to run tests? #14

Closed
b00f opened this issue Feb 19, 2020 · 2 comments
Closed

How to run tests? #14

b00f opened this issue Feb 19, 2020 · 2 comments

Comments

@b00f
Copy link
Contributor

b00f commented Feb 19, 2020

There is no help on how to run all the tests in sdk. Please update README.

@githubckgoh1439
Copy link

Hi, guys

Below is the summary of RUN TEST.

Title : How to - SDK Setup & Run Test

Clone base on this - https://github.com/maxonrow/maxonrow-go/tree/develop

Clone base on this SDK - https://github.com/maxonrow/mxw-sdk-js

Start the localhost mxw-blockchain, by example below :
eg.

mxwd start --home ~/.mxwgo

RUN this 'npm run dist-test-multisig' under root path of SDK-project-set

4.1.
Below example as optional :
Case-1 : npm run dist-test-utils
Case-2 : npm run dist-test-provider
Case-3 : npm run dist-test-multisig

** refer details on file : package.json

4.2
Example log as below : by run 'npm run dist-test-utils'

> mxw-sdk-js@0.8.0 dist-test-utils /Users/einnity/gowork/src/github.com/maxonrow-docs-gohhub/mxw-sdk-js-yk
> npm run build && mocha --timeout 60000 -r ts-node/register tests/test-0600-utils.ts


> mxw-sdk-js@0.8.0 build /Users/einnity/gowork/src/github.com/maxonrow-docs-gohhub/mxw-sdk-js-yk
> npm run clean && npm run dist-version && npm run compile


> mxw-sdk-js@0.8.0 clean /Users/einnity/gowork/src/github.com/maxonrow-docs-gohhub/mxw-sdk-js-yk
> rm -rf ./dist


> mxw-sdk-js@0.8.0 dist-version /Users/einnity/gowork/src/github.com/maxonrow-docs-gohhub/mxw-sdk-js-yk
> node -e "let v = require('./package.json').version; require('fs').writeFileSync('./src.ts/_version.ts', 'export const version = \"' + v +'\";\n')"


> mxw-sdk-js@0.8.0 compile /Users/einnity/gowork/src/github.com/maxonrow-docs-gohhub/mxw-sdk-js-yk
> tsc -p ./tsconfig.json



  Suite: Utils
    ✓ Test bytes
    ✓ Test shallow copy properties
    ✓ Test camelize
    ✓ Test unit convert to blockchain format (readable => bigNumber)
    ✓ Test unit convert to blockchain format with 18 decimals (readable => bigNumber)
    ✓ Test unit convert to readable format (bigNumber => readable)
    ✓ Test unit convert to readable format with 18 decimals (bigNumber => readable)
    ✓ Normalize bech32 address
    ✓ Normalize hex address
    ✓ Generate random hash value
    ✓ Test SHA256 hash value
    ✓ Adhoc test


  12 passing (24ms)

@b00f
Copy link
Contributor Author

b00f commented Mar 29, 2020

@githubckgoh1439 Thanks.

@b00f b00f closed this as completed Mar 29, 2020
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

No branches or pull requests

2 participants