This is a sample test where I am testing that testNum should be 0,
code:
describe("Test Contract", () => {
before(async () => {
const testNum = 0;
})
it("should be zero", function () {
expect(testNum).to.equal(0);
})
}
But I am getting an error saying testNum is undefined.
Error:
1) Test Contract
should be zero:
ReferenceError: testNum is not defined
What I am doing wrong?