ReferenceError: simpleStorage is not defined #2468
Answered
by
alymurtazamemon
blaynejosh
asked this question in
Q&A
-
Hey, I'm having issues with my hardhat test deployment I get this Can anyone help? const { ethers } = require("hardhat")
const { expect, assert } = require("chai")
describe("SimpleStorage", function () {
beforeEach(async function () {
let simpleStorageFactory, simpleStorage
simpleStorageFactory = await ethers.getContractFactory("SimpleStorage")
simpleStorage = await simpleStorageFactory.deploy()
})
it("Should start with a favorite number of 0", async function () {
const currentValue = await simpleStorage.retrieve()
const expectedValue = "0"
assert.equal(currentValue.toString(), expectedValue)
})
})
... |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Sep 10, 2022
Replies: 2 comments 2 replies
-
@blaynejosh define this above let simpleStorageFactory, simpleStorage; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
blaynejosh
-
yes it is working |
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
@blaynejosh define this above
beforeEach