Currently, I am using the newest version of Hardhat on WSL. Following the demonstration provided by Hardhat, I have installed the npm packages for hardhat toolbox. However, I am encountering an error that is unclear to me.
Initially, I was utilizing the 'const' and 'require' format. Afterward, I switched to the 'import' format.
Typically, imports() are utilized in '.mjs' modules. Therefore, I thought perhaps I needed to change the 'type' to 'module'. Unfortunately, even after this adjustment (shown in the third iteration), the issue persists.
Interestingly, the 'node_modules/chai/index.mjs' file already employs an import statement!
Please provide guidance on how to proceed.
Below is my script file:
// const {ethers} = require("hardhat")
// const {expect} = require("chai")
import {expect} from 'chai'
import {ethers } from 'hardhat'
describe("SafeHeiro Base Implementation", function(){
it("Should correctly assign the value '3' to 'Test' key", async function () {
const safeHeiro = await ethers.deployContract('safeHeiro')
await safeHeiro.waitForDeployment()
await safeHeiro.callThis()
expect(await safeHeiro.getValueOfThis()).to.equal(3)
})
})