danielfloresd / team-profile-generator

Initialization in variable declarations against recommended approach JS-0119
Anti-pattern
Minor
a year agoa year old
Variable 'emailUndefined' should be initialized on declaration
165        it("should throw an error if 'email' is undefined", () => {
166            const name = 'Bob';
167            const id = 20;
168            let emailUndefined;169            const officeNumber = 1001;
170            
171            const cb = () => new Manager(name, id, emailUndefined, officeNumber);
Variable 'idUndefined' should be initialized on declaration
 95
 96        it("should throw an error if 'id' is undefined", () => {
 97            const name = 'Bob';
 98            let idUndefined; 99            const email = '[email protected]';
100            const officeNumber = 1001;
101            
Variable 'nameUndefined' should be initialized on declaration
 50        });
 51
 52        it("should throw an error if 'name' is undefined", () => {
 53            let nameUndefined; 54            const id = 20;
 55            const email = '[email protected]';
 56            const officeNumber = 1001;
Variable 'emailUndefined' should be initialized on declaration
165        it("should throw an error if 'email' is undefined", () => {
166            const name = 'Daniel';
167            const id = 1;
168            let emailUndefined;169            const school = 'University of Arizona';
170            
171            const cb = () => new Intern(name, id, emailUndefined, school);
Variable 'idUndefined' should be initialized on declaration
 95
 96        it("should throw an error if 'id' is undefined", () => {
 97            const name = 'Daniel';
 98            let idUndefined; 99            const email = '[email protected]';
100            const school = 'University of Arizona';
101