JSPM

marketplace-testbed

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q31869F
  • License MIT

A test platform for Scatter Marketplace

Package Exports

  • marketplace-testbed

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (marketplace-testbed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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"