lesson 6-test Error-ReferenceError: l is not defined #5440
-
I am getting this blue@DESKTOP-A6GBG6O:~/solidity-fcc$ yarn hardhat test
yarn run v1.22.19
$ /home/blue/solidity-fcc/node_modules/.bin/hardhat test
An unexpected error occurred:
ReferenceError: l is not defined
at Object.<anonymous> (/home/blue/solidity-fcc/hardhat.config.js:4:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at importCsjOrEsModule (/home/blue/solidity-fcc/node_modules/hardhat/src/internal/core/config/config-loading.ts:30:22)
at loadConfigAndTasks (/home/blue/solidity-fcc/node_modules/hardhat/src/internal/core/config/config-loading.ts:94:18)
at main (/home/blue/solidity-fcc/node_modules/hardhat/src/internal/cli/cli.ts:200:62)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
const { ethers } = require("hardhat");
// const { describe, beforeEach, it } = require("node:test");
const { assert, expect } = require("chai");
describe("SimpleStorage", function () {
let storagefactory, Simplefactory;
beforeEach(async function () {
storagefactory = await ethers.getContractFactory("SimpleStorage");
Simplefactory = await storagefactory.deploy();
});
it("Should start with 0", async function () {
const defaultvalue = await Simplefactory.retrieve();
const expectedValue = 0;
assert.equal(defaultvalue.toString(), expectedValue);
});
it("input value equal to stored value", async function () {
const storing = "55";
const retireve = await Simplefactory.store(storing);
assert.equal(await Simplefactory.retrieve().toString(), retireve);
});
}); |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
May 6, 2023
Replies: 3 comments 1 reply
-
@rainbowginger Please share your repo link. You have left |
Beta Was this translation helpful? Give feedback.
1 reply
-
… On Fri, May 5, 2023, 22:37 Ali Murtaza < ***@***.***> wrote:
@rainbowginger Please share your repo link. You have left l somewhere due
to it, it is throwing reference error. —Reply to this email directly, view
it on GitHub, or unsubscribe.You are receiving this
*DuckDuckGo* removed 1 tracker.
More →
<https://duckduckgo.com/-ZXOpP0SGZLHbMFlvQhSFFv2_mZFuUhEpqhQ1Qpai0Dg3j1h3j9AaqvzJB7GlWEFjtylVs9dHmukSr17AetYtoX9GBiJE98W64aMRsB9g4B2OtQdfPh3uzmJ2EvF4JVTAYMfv9POsJ_LCn4PnwLJ9tSaZRld_Ls-Ha1lgZE7vARBHnZRpEQtd8mC5S19-w4h4ZgWIN65J4HN4yNs3JBxzvtD6x_p8WpafMSwbj0RvSQXc31_hEOAgb86ZK1KY1aj-wYf9WADINKW9gALaFKs5Zuszc7VLpAE>
@rainbowginger <https://github.com/rainbowginger> Please share your repo
link. You have left l somewhere due to it, it is throwing reference error.
—
Reply to this email directly, view it on GitHub
<#5440 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3NHEVIGF3EZGFCGAIFHIOLXEUXTTANCNFSM6AAAAAAXXE352U>
.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-js/repo-discussions/5440/comments/5818328
@github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
thanks, Issue solved
i did try to solve it myself, but cudnt find it.
But i will be more careful in future
…On Sat, May 6, 2023 at 10:10 AM Ali Murtaza < ***@***.***> wrote:
@rainbowginger Yes, on line 4 in hardhat.config.js file you have left l;
remove it. You should try to read the errors to better solve these issues
yourself. —Reply to this email directly, view it on G
*DuckDuckGo* removed 1 tracker.
More →
<https://duckduckgo.com/-xW2pE-I1iwO7yXoToii06P_NjHSTikhRpagRshSFxrl5xLp7hNZQ5U8-iC3FChq7TamavT7STJd49QLWs24J_TMyECG6L9YNH42A_QAD73CsPfjy6XB3FrOTiMcroWLwZkY3rNEs1xS-D_r9ttmBRkEV2PYzcT7c22CK1nIOY4DZFqGKp0q2uFBDHdsdPBPc1TBOAfZC-LNw0TsOzjDXenEfHx0r9iI-_TVjPBK9JRVwf_eEQ4CDvDlnrkhhVqP6Bx_2YwEg05T2AgpoU6zmmK3PzNUukQY>
@rainbowginger <https://github.com/rainbowginger> Yes, on line 4 in
hardhat.config.js file you have left l; remove it.
You should try to read the errors to better solve these issues yourself.
—
Reply to this email directly, view it on GitHub
<#5440 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3NHEVPKSQW3V7HGLUBV4KLXEXI5JANCNFSM6AAAAAAXXE352U>
.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-js/repo-discussions/5440/comments/5822242
@github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@rainbowginger Yes, on line 4 in
hardhat.config.js
file you have leftl;
remove it.You should try to read the errors to better solve these issues yourself.