Lesson 6: Typescript problem #5845
Unanswered
TucanCrypto
asked this question in
Q&A
Replies: 1 comment
-
I changed my test-deploy.ts and now works: import { ethers } from "hardhat"
import { expect, assert } from "chai"
import { SimpleStorage, SimpleStorage__factory } from "../typechain-types"
describe("SimpleStorage", function () {
//let simpleStorageFactory: SimpleStorage__factory
//let simpleStorage: SimpleStorage
let simpleStorage: any
beforeEach(async function () {
const simpleStorageFactory = await ethers.getContractFactory(
"SimpleStorage"
)
simpleStorage = await simpleStorageFactory.deploy()
await simpleStorage.waitForDeployment()
})
it("Should start with a favorite number of 0", async function () {
const currentValue = await simpleStorage.retrieve()
const expectedValue = "0"
assert.equal(currentValue.toString(), expectedValue)
})
it("Should update when we call store", async function () {
const expectedValue = "7"
const transactionResponse = await simpleStorage.store("7")
await transactionResponse.wait(1)
const currentValue = await simpleStorage.retrieve()
assert.equal(currentValue.toString(), expectedValue)
})
}) |
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.
-
I complete alomst all lesson 6 (so I would like no change my package.json because if I change ethers v6 by ethers v5 this file executes but the rest no) except the last minute because I can't even execute my test-deploy.ts; because the following problem appears:
My test-deploy.ts look like:
My hardhat.config.ts is:
And my pacakage.json:
Beta Was this translation helpful? Give feedback.
All reactions