Lesson 6: Running Tests: Test argument "title" should be a string. Received type "undefined" #2168
Answered
by
eli5mecoding
eli5mecoding
asked this question in
Q&A
-
Getting this error when running yarn hardhat test: const { ethers } = require("hardhat")
const { expect, assert } = require("chai")
describe("SimpleStorage", function () {
let SimpleStorageFactory
let 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)
})
it()
it()
}) |
Beta Was this translation helpful? Give feedback.
Answered by
eli5mecoding
Aug 29, 2022
Replies: 1 comment
-
Found the answer, I forgot to remove the 2 remaining it() at the end of code. It's working now |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
eli5mecoding
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the answer, I forgot to remove the 2 remaining it() at the end of code. It's working now