Skip to content

Lesson 9 - Unit test fist stage - 0 test pass #2959

Answered by RoboCrypter
Leonardll asked this question in Q&A
Discussion options

You must be logged in to vote

@Leonardll : Make these changes in your test file :

  • From this : const { deployer } = await getNamedAccounts() To this : deployer = (await getNamedAccounts()).deployer

  • And also declare the deployer in this line : let raffle, vrfCoordinatorV2Mock, interval, deployer Like this!

  • Also declare your interval in your beforeEach

Your updated test should look like this :

const { assert } = require("chai")
const { getNamedAccounts, deployments, ethers, network } = require("hardhat")
const { developementChains, networkConfig } = require("../..helper-hardhat-config")

!developementChains.includes(network.name)
    ? describe.skip
    : describe("Raffle Unit Tests", function () {
          let …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Leonardll
Comment options

@RoboCrypter
Comment options

@Leonardll
Comment options

Answer selected by Leonardll
Comment options

You must be logged in to vote
1 reply
@Leonardll
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants