1.0.5 • Published 6 years ago
marketplace-testbed v1.0.5
marketplace-testbed
This package provides a platform for testing the Scatter Marketplace system. It contains:
- A local EOSIO testnet loaded with:
- The SimpleAssets contract.
- The dGoods contract.
- The Scatter Marketplace contract.
- Generated fake data for each of these contracts.
- An HTTP server that mimics the basic data routes present in the Scatter Marketplace API filled with fake data.
Usage
From the Git repository
If you clone this repository, you can simply run npm install and then
npm start to start up the testbed (mock server + testnet).
As an npm package
Add this package as a devDependency of yours with:
npm install -D marketplace-testbedYou can then start it using the binary provided:
npx marketplace-testbedor in your package.json scripts:
"scripts": {
"testbed": "marketplace-testbed",
"just-server": "marketplace-testbed server",
"just-testnet": "marketplace-testbed testnet"
}Mocha lifecycle hooks
You can use the provided before/after hooks for your mocha test suites
by prepending their file to the rest of your tests:
mocha node_modules/marketplace-testbed/dist/mocha.js "test/**/*.spec.js"
# or, just mock server:
mocha node_modules/marketplace-testbed/dist/mocha-server.js "test/**/*.spec.js"
# or, just testnet:
mocha node_modules/marketplace-testbed/dist/mocha-testnet.js "test/**/*.spec.js"