Skip to content

Lesson 9 Unit Testing error: "AssertionError: expected '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb…' to equal undefined" #4931

Answered by sefkoleen
sefkoleen asked this question in Q&A
Discussion options

You must be logged in to vote

AGH, I knew it was something outrageous.
If somebody else is wondering the culprit was the "deployer" variable. I defined the

let deployer

as a state variable, and then said:

beforeEach(async function () {
              const deployer = (await getNamedAccounts()).deployer
              console.log(`${deployer} is the Deployer`)

instead of

beforeEach(async function () {
              deployer = (await getNamedAccounts()).deployer
              console.log(`${deployer} is the Deployer`)

🙃

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sefkoleen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant