Calldata.test.js 630 B

12345678910111213141516171819202122
  1. const { ethers } = require('hardhat');
  2. const { expect } = require('chai');
  3. const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
  4. async function fixture() {
  5. const mock = await ethers.deployContract('$Calldata');
  6. return { mock };
  7. }
  8. describe('Calldata utilities', function () {
  9. beforeEach(async function () {
  10. Object.assign(this, await loadFixture(fixture));
  11. });
  12. it('emptyBytes', async function () {
  13. await expect(this.mock.$emptyBytes()).to.eventually.equal('0x');
  14. });
  15. it('emptyString', async function () {
  16. await expect(this.mock.$emptyString()).to.eventually.equal('');
  17. });
  18. });