Skip to content

Commit 1dd6815

Browse files
committed
add tests for Nameable
1 parent 8e558e8 commit 1dd6815

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/9_Nameable.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { deployed } from '../scripts/deploy';
2+
import { Nameable } from '../typechain-types';
3+
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
4+
import { expect } from 'chai';
5+
import { ethers } from 'hardhat';
6+
7+
describe('ERC20 Helper tests', function () {
8+
let nameable: Nameable;
9+
let owner: SignerWithAddress;
10+
const name = 'TEST name';
11+
const version = '1.0.0';
12+
13+
before(async () => {
14+
[owner] = await ethers.getSigners();
15+
nameable = await deployed('Nameable', name, version);
16+
});
17+
18+
it('should return name of contract', async () => {
19+
const contractName = await nameable.name();
20+
expect(name).to.equal(contractName);
21+
});
22+
23+
it('should return version of contract', async () => {
24+
const contractVersion = await nameable.version();
25+
expect(version).to.equal(contractVersion);
26+
});
27+
});

0 commit comments

Comments
 (0)