Hardhat test having problems

i have problems with test contract in hardhat trying to solve this i change name to box too

:computer: Environment
hardhat solidity 0.8.0

:memo:Details
error
describe(‘Box’, function () {
^
ReferenceError: describe is not defined
:1234: Code to reproduce

    // test/Box.js
    // Load dependencies
    const { expect } = require('chai');

    // Start test block
    describe('Box', function () {
      before(async function () {
        this.Box = await ethers.getContractFactory("Box");
      });

      beforeEach(async function () {
        this.box = await this.Box.deploy();
        await this.box.deployed();
      });

      // Test case
      it('retrieve returns a value previously stored', async function () {
        // Store a value
        await this.box.store(42);

        // Test if the returned value is the same one
        // Note that we need to use strings to compare the 256 bit integers
        expect((await this.box.retrieve()).toString()).to.equal('42');
      });
    });
1 Like

Hi @Guard_Colombia,

I suggest going through the following guide to ensure that you have your test environment setup: https://docs.openzeppelin.com/learn/writing-automated-tests#setting-up-a-testing-environment