Skip to content

Commit

Permalink
Remove mentions of test-environment
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Aug 20, 2021
1 parent 09ea0a6 commit d34a644
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* Handle [very large numbers](https://docs.openzeppelin.com/test-helpers/api#bn)
* Simulate the [passing of time](https://docs.openzeppelin.com/test-helpers/api#time)

Test Helpers integrates seamlessly with [OpenZeppelin Test Environment](https://docs.openzeppelin.com/test-environment), but it also supports Truffle tests and regular web3 workflows.

## Overview

### Installation
Expand All @@ -36,23 +34,17 @@ Remember to include the plugin in your configuration as explained in the [instal

Import `@openzeppelin/test-helpers` in your test files to access the different assertions and utilities.

_Note: The following snippet uses [OpenZeppelin Test Environment](https://docs.openzeppelin.com/test-environment): a Truffle-based setup would work the same way._

```javascript
const { accounts, contract } = require('@openzeppelin/test-environment');

const {
BN, // Big Number support
constants, // Common constants, like the zero address and largest integers
expectEvent, // Assertions for emitted events
expectRevert, // Assertions for transactions that should fail
} = require('@openzeppelin/test-helpers');

const ERC20 = contract.fromArtifact('ERC20');

describe('ERC20', function () {
const [sender, receiver] = accounts;
const ERC20 = artifacts.require('ERC20');

contract('ERC20', function ([sender, receiver]) {
beforeEach(async function () {
// The bundled BN library is the same one web3 uses under the hood
this.value = new BN(1);
Expand Down
2 changes: 0 additions & 2 deletions docs/modules/ROOT/pages/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ const { expectRevert } = require('@openzeppelin/test-helpers');

The configuration must be applied on all test files, _before_ importing the helpers.

TIP: When using xref:test-environment::index.adoc[*OpenZeppelin Test Environment*], all of these options will be automatically configured.

== `provider`

Used by helpers that connect to the test environment via a web3 provider, like xref:api.adoc#balance[`balance`] and xref:api.adoc#time[`time`].
Expand Down
12 changes: 2 additions & 10 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* Handle xref:api.adoc#bn[very large numbers]
* Simulate the xref:api.adoc#time[passing of time]

Test Helpers integrates seamlessly with xref:test-environment::index.adoc[*OpenZeppelin Test Environment*], but it also supports both Truffle tests and regular web3 workflows.

== Overview

=== Installation
Expand All @@ -32,23 +30,17 @@ Remember to include the plugin in your configuration as explained in the https:/

Import `@openzeppelin/test-helpers` in your test files to access the different assertions and utilities.

NOTE: The following snippet uses xref:test-environment::index.adoc[OpenZeppelin Test Environment]: a Truffle-based setup would work the same way.

```javascript
const { accounts, contract } = require('@openzeppelin/test-environment');

const {
BN, // Big Number support
constants, // Common constants, like the zero address and largest integers
expectEvent, // Assertions for emitted events
expectRevert, // Assertions for transactions that should fail
} = require('@openzeppelin/test-helpers');

const ERC20 = contract.fromArtifact('ERC20');

describe('ERC20', function () {
const [sender, receiver] = accounts;
const ERC20 = artifacts.require('ERC20');

describe('ERC20', function ([sender, receiver]) {
beforeEach(async function () {
// The bundled BN library is the same one web3 uses under the hood
this.value = new BN(1);
Expand Down

0 comments on commit d34a644

Please sign in to comment.