LESSION 6 #727
NagoriMustakim
started this conversation in
General
LESSION 6
#727
Replies: 2 comments
-
|
yeah, I get the solution I am testing the default test file. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You are testing the Greeter file. It is best advised to just delete it and test with your own SimpleStorage files. Let me know if this helps! |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
const { ethers } = require("hardhat"); const { expect, assert } = require("chai"); describe("SimpleStorage", function () { let simpleStorageFactory, simpleStorage; beforeEach(async function () { 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); }); itonly("Should update when we call store", async function () { const expectedValue = "7"; const transactionResponse = await simpleStorage.store(expectedValue); await transactionResponse.wait(1); const currentValue = await simpleStorage.retrieve(); assert.equal(currentValue.toString(), expectedValue); }); });Testing error:
please help me
Beta Was this translation helpful? Give feedback.
All reactions