0 test passing problem! #225
-
Hey, I am on 20:54:00, making tests for basic nft. but when I am running my tests it is showing that
Here is my test const { assert } = require("chai")
const { network, deployments, ethers } = require("hardhat")
const { developmentChains } = require("../../helper-hardhat-config")
!developmentChains.includes(network.name)
? describe.skip
: describe("unit test for basicNft", function() {
describe("constructor", function () {
let basicNft, tokenCounter;
beforeEach(async function () {
await deployments.fixture(["basicNft"]);
basicNft = await ethers.getContract("BasicNft");
tokenCounter = await basicNft.getTokenCounter();
})
it("initailzes counter value correctly", async function (){
assert.equal(tokenCounter.toString(), "0");
})
})
}) I even tried copy-pasting patricks code from repo but it still showing "0 passing". |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
It could be skipping your tests.
are your developmentChains correct? |
Beta Was this translation helpful? Give feedback.
-
Change the |
Beta Was this translation helpful? Give feedback.
-
By integrating to @PatrickAlphaC answer, you can overwrite the location about your test folder with key called Example: Location Hardhat tests: {project_root_folder}/test/smartcontract Hardhat.config.js
|
Beta Was this translation helpful? Give feedback.
Change the
tests
folder name totest