JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 602
  • Score
    100M100P100Q90399F
  • License Apache-2.0

Hardhat network to spin up for testing

Package Exports

  • ethereum-test-network

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 (ethereum-test-network) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TypeScript version Node.js version APLv2 Build Status - Travis Build Status - GitHub Actions

Just a wrapper around hardhat-network

describe('eth test network', () => {
  let testnetwork: TestNetwork;

  // Act before assertions
  beforeEach(async () => {
    testnetwork = await TestNetwork.init();
  });
  afterEach(async () => {
    await testnetwork.close();
  });

  it('should check block number', async () => {
    const provider = new ethers.providers.JsonRpcProvider(JSON_RPC_PROVIDER);
    const blockNumber = await provider.getBlockNumber();
    expect(blockNumber).toBe(0);
  });
});

Available Scripts

  • clean - remove coverage data, Jest cache and transpiled files,
  • build - transpile TypeScript to ES6,
  • build:watch - interactive watch mode to automatically transpile source files,
  • lint - lint source files and tests,
  • test - run tests,
  • test:watch - interactive watch mode to automatically re-run tests

Additional Informations

License

Licensed under the APLv2. See the LICENSE file for details.