* Sketch * Migrate all tests to test-env * Finish migration to test-env * Add config * Work on GSN tests * Migrate to newer test-env version and loader syntax * Add GSN setup * Finish test-env migration * Setup coverage using test-env * Migrate to npm package * Fix package.json * Add compile step to CI * Add comment on coverage setup * Remove dependency on @truffle/contract * Fix package-lock merge * Fix linter errors * Upgrade test-environment, depend locally on ganche-coverage * Improve coverage script * Improve sign.js API * Move accounts destructuring to describe block * Switch to prebuilt ethereumjs-vm package * Upgrade test-enviroment version * use workspace in circleci config * remove unnecessary npx
29 lines
849 B
JavaScript
29 lines
849 B
JavaScript
const { contract } = require('@openzeppelin/test-environment');
|
|
const { BN } = require('@openzeppelin/test-helpers');
|
|
|
|
const { expect } = require('chai');
|
|
|
|
const ERC20DetailedMock = contract.fromArtifact('ERC20DetailedMock');
|
|
|
|
describe('ERC20Detailed', function () {
|
|
const _name = 'My Detailed ERC20';
|
|
const _symbol = 'MDT';
|
|
const _decimals = new BN(18);
|
|
|
|
beforeEach(async function () {
|
|
this.detailedERC20 = await ERC20DetailedMock.new(_name, _symbol, _decimals);
|
|
});
|
|
|
|
it('has a name', async function () {
|
|
expect(await this.detailedERC20.name()).to.equal(_name);
|
|
});
|
|
|
|
it('has a symbol', async function () {
|
|
expect(await this.detailedERC20.symbol()).to.equal(_symbol);
|
|
});
|
|
|
|
it('has an amount of decimals', async function () {
|
|
expect(await this.detailedERC20.decimals()).to.be.bignumber.equal(_decimals);
|
|
});
|
|
});
|