marketplace-testbed
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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-testbed

You can then start it using the binary provided:

npx marketplace-testbed

or 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"

Package Sidebar

Install

npm i marketplace-testbed

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

482 kB

Total Files

50

Last publish

Collaborators

  • andresberrios