describe("SimpleStorage", function(){ ^ ReferenceError: describe is not defined #863
Unanswered
prashanta0234
asked this question in
Q&A
Replies: 2 comments
-
Please refactor your problem by following these guidelines and mention me when done: linked here |
Beta Was this translation helpful? Give feedback.
0 replies
-
you must be using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
const { assert } = require("chai");
const { ethers } = require("hardhat");
describe("SimpleStorage", function(){
let simpleStorageFactory;
let simpleStorage;
beforeEach(async function (){
simpleStorageFactory=await ethers.getContractFactory("SimpleStorage");
simpleStorage=await simpleStorageFactory.deploy();
})
it("Return number 0", async function(){
const value=await simpleStorage.retrieve();
assert.equal(value.toString(),0);
})
})
My package file file::
{
"name": "hardhat-simple-storage",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.0",
"chai": "^4.2.0",
"ethereum-waffle": "^3.0.0",
"ethers": "^5.0.0",
"hardhat": "^2.9.9"
},
"dependencies": {
"mocha": "^10.0.0"
}
}
I don`t understand where is the problem.
Beta Was this translation helpful? Give feedback.
All reactions