Variable 'vars' should be initialized on declaration
10describe('Makes an empty donation 2', function () {
11 let driver;
12 // eslint-disable-next-line no-unused-vars
13 let vars;14
15 beforeEach(async function () {
16 driver = new webdriver.Builder()
Variable 'driver' should be initialized on declaration
8 webdriver = require('selenium-webdriver');
9
10describe('Makes an empty donation 2', function () {
11 let driver;12 // eslint-disable-next-line no-unused-vars
13 let vars;
14
Variable 'driver' should be initialized on declaration
8
9describe('Makes an empty donation', function () {
10 jest.setTimeout(60000);
11 let driver;12 // eslint-disable-next-line no-unused-vars
13 let vars;
14 beforeEach(async function () {
Variable 'vars' should be initialized on declaration
10 jest.setTimeout(60000);
11 let driver;
12 // eslint-disable-next-line no-unused-vars
13 let vars;14 beforeEach(async function () {
15 driver = await new Builder().forBrowser('chrome').build();
16 vars = {};
Variable 'driver' should be initialized on declaration
9
10describe('Make a donation', function () {
11 jest.setTimeout(60000);
12 let driver; 13 // eslint-disable-next-line no-unused-vars
14 let vars;
15 beforeEach(async function () {
Variable 'vars' should be initialized on declaration
11 jest.setTimeout(60000);
12 let driver;
13 // eslint-disable-next-line no-unused-vars
14 let vars; 15 beforeEach(async function () {
16 driver = await new Builder().forBrowser('chrome').build();
17 vars = {};
Variable 'vars' should be initialized on declaration
11 jest.setTimeout(60000);
12 let driver;
13 // eslint-disable-next-line no-unused-vars
14 let vars;15 beforeEach(async function () {
16 driver = await new Builder().forBrowser('chrome').build();
17 vars = {};
Variable 'driver' should be initialized on declaration
9
10describe('Hot meal learn more', function () {
11 jest.setTimeout(60000);
12 let driver;13 // eslint-disable-next-line no-unused-vars
14 let vars;
15 beforeEach(async function () {
Variable 'vars' should be initialized on declaration
16
17 jest.setTimeout(60000);
18 // eslint-disable-next-line no-unused-vars
19 let vars; 20 beforeEach(async function () {
21 driver = await new Builder().forBrowser('chrome').build();
22 vars = {};
Variable 'vars' should be initialized on declaration
11 jest.setTimeout(30000);
12 let driver;
13 // eslint-disable-next-line no-unused-vars
14 let vars;15 beforeEach(async function () {
16 driver = await new Builder().forBrowser('chrome').build();
17 vars = {};
Variable 'driver' should be initialized on declaration
9
10describe('email', function () {
11 jest.setTimeout(30000);
12 let driver;13 // eslint-disable-next-line no-unused-vars
14 let vars;
15 beforeEach(async function () {
Description
In JavaScript, variables can be assigned during declaration, or at any point afterwards using an assignment statement. For example, in the following code, foo
is initialized during declaration, while bar
is initialized later.
var foo = 1;
var bar;
if (foo) {
bar = 1;
} else {
bar = 2;
}
Bad Practice
function foo() {
var bar;
let baz;
}
Recommended
function foo() {
var bar = 1;
let baz = 2;
const qux = 3;
}