Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit e5d6397

Browse files
committed
Fix sonar code smells
1 parent ba38846 commit e5d6397

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

test/acceptance/cli/fixtures/autocomplete.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ const MyCli = class MyCli {
4747
async displayMainMenu() {
4848
this._cli.clearScreen();
4949
this._selectedOption = await this._cli.inquire("main");
50-
switch (this._selectedOption) {
51-
case "tags":
52-
return this.changeTags();
50+
if (this._selectedOption === "tags") {
51+
return this.changeTags();
5352
}
5453
}
5554
};

test/unit/api/Features.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const Features = require("../../../lib/api/Features");
66
describe("Features Api", () => {
77
let sandbox;
88
let routerStubs;
9+
let resMock;
910
let statusSpy;
1011
let sendSpy;
1112

@@ -15,7 +16,6 @@ describe("Features Api", () => {
1516
get: sandbox.stub(),
1617
put: sandbox.stub()
1718
};
18-
routerGetStub = sandbox.stub();
1919
sandbox.stub(express, "Router").returns(routerStubs);
2020
statusSpy = sandbox.spy();
2121
sendSpy = sandbox.spy();

test/unit/api/Settings.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const Settings = require("../../../lib/api/Settings");
88
describe.only("Settings Api", () => {
99
let sandbox;
1010
let routerStubs;
11+
let resMock;
1112
let statusSpy;
1213
let sendSpy;
1314
let settingsMocks;
@@ -19,7 +20,6 @@ describe.only("Settings Api", () => {
1920
put: sandbox.stub()
2021
};
2122
settingsMocks = new SettingsMocks();
22-
routerGetStub = sandbox.stub();
2323
sandbox.stub(express, "Router").returns(routerStubs);
2424
statusSpy = sandbox.spy();
2525
sendSpy = sandbox.spy();

test/unit/lib/Server.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const Server = require("../../../lib/Server");
1313
const FOO_FEATURES_PATH = "foo-path";
1414

1515
describe("Server", () => {
16+
let server;
1617
let sandbox;
1718
let featuresMocks;
1819
let settingsMocks;

test/unit/lib/middlewares.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe("middlewares", () => {
1010
let sendSpy;
1111
let resMock;
1212
let nextSpy;
13+
let headerSpy;
1314

1415
beforeEach(() => {
1516
sandbox = sinon.createSandbox();

0 commit comments

Comments
 (0)