ERC721Enumerable.test.js 722 B

12345678910111213141516171819202122232425262728
  1. const { ethers } = require('hardhat');
  2. const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
  3. const {
  4. shouldBehaveLikeERC721,
  5. shouldBehaveLikeERC721Metadata,
  6. shouldBehaveLikeERC721Enumerable,
  7. } = require('./ERC721.behavior');
  8. const name = 'Non Fungible Token';
  9. const symbol = 'NFT';
  10. async function fixture() {
  11. return {
  12. accounts: await ethers.getSigners(),
  13. token: await ethers.deployContract('$ERC721Enumerable', [name, symbol]),
  14. };
  15. }
  16. describe('ERC721', function () {
  17. beforeEach(async function () {
  18. Object.assign(this, await loadFixture(fixture));
  19. });
  20. shouldBehaveLikeERC721();
  21. shouldBehaveLikeERC721Metadata(name, symbol);
  22. shouldBehaveLikeERC721Enumerable();
  23. });