Skip to content

Commit

Permalink
Removed unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Sep 23, 2018
1 parent f46bcb9 commit 580a592
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 27 deletions.
1 change: 0 additions & 1 deletion src/tests/integration/config-file-repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as fs from "fs";
import { ConfigFileRepository } from "../../ts/config-file-repository";
import { WebSearch } from "../../ts/web-search";
import { ConfigOptions } from "../../ts/config-options";
import { dummyWebSearches } from "../unit/test-helpers";

const defaultConfig = {
webSearches: [
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/count-file-repository.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeFileSync, unlinkSync, existsSync, writeSync } from "fs";
import { writeFileSync, unlinkSync, existsSync } from "fs";
import { Count } from "../../ts/count";
import { CountFileRepository } from "../../ts/count-file-repository";
import { join } from "path";
Expand Down
5 changes: 1 addition & 4 deletions src/tests/integration/helpers/file-helpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { FileHelpers } from "../../../ts/helpers/file-helpers";
import { join } from "path";
import { mkdirSync, writeFileSync, unlinkSync, rmdirSync, chmodSync } from "fs";
import { mkdirSync, writeFileSync, unlinkSync, rmdirSync } from "fs";

describe(FileHelpers.name, (): void => {
describe(FileHelpers.getFilesFromFolder.name, (): void => {
Expand Down
1 change: 0 additions & 1 deletion src/tests/unit/count-manager.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CountManager } from "../../ts/count-manager";
import { FakeCountRepository } from "./fake-count-repository";
import { exec } from "child_process";
import { Count } from "../../ts/count";

describe("CountManager", (): void => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { FilePathExecutionArgumentValidator } from "../../../ts/execution-argument-validators/file-path-execution-argument-validator";
import { Injector } from "../../../ts/injector";
import { OperatingSystem } from "../../../ts/operating-system";
import { invalidMacOsFilePaths, invalidWindowsFilePaths, validMacOsFilePaths, validWindowsFilePaths } from "../test-helpers";
import { platform } from "os";

Expand Down
3 changes: 0 additions & 3 deletions src/tests/unit/execution-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe(ExecutionService.name, (): void => {
const logExecution = false;

const executor1 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);
const executor2 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);

const combinations = [
{
Expand All @@ -100,7 +99,6 @@ describe(ExecutionService.name, (): void => {
const logExecution = false;

const executor1 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);
const executor2 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);

const combinations = [
{
Expand All @@ -125,7 +123,6 @@ describe(ExecutionService.name, (): void => {
const logExecution = true;

const executor1 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);
const executor2 = new FakeExecutor(hideAfterExecution, resetUserInputAfterExecution, logExecution);

const combinations = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/helpers/operating-system-helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe(OperatingSystemHelpers.name, () => {

for (const unsupportedPlatform of unsupportedPlatforms) {
try {
const actual = OperatingSystemHelpers.getOperatingSystemFromString(unsupportedPlatform);
OperatingSystemHelpers.getOperatingSystemFromString(unsupportedPlatform);
} catch (error) {
expect(error instanceof OperatingSystemNotSupportedError).toBe(true);
errorCounter++;
Expand Down
1 change: 0 additions & 1 deletion src/tests/unit/input-validation-service.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { InputValidationService } from "../../ts/input-validation-service";
import { InputValidatorSearcherCombination } from "../../ts/input-validator-searcher-combination";
import { FakeSearcher } from "./fake-searcher";
import { FakeInputValidator } from "./fake-input-validator";
import { SearchResultItem } from "../../ts/search-result-item";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Injector } from "../../../ts/injector";
import { CalculatorInputValidator } from "../../../ts/input-validators/calculator-input-validator";

describe(CalculatorInputValidator.name, (): void => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Injector } from "../../../ts/injector";
import { FilePathInputValidator } from "../../../ts/input-validators/file-path-input-validator";
import { OperatingSystem } from "../../../ts/operating-system";
import { platform } from "os";

describe(FilePathInputValidator.name, (): void => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Injector } from "../../../ts/injector";
import { SearchPluginsInputValidator } from "../../../ts/input-validators/search-plugins-input-validator";

describe(SearchPluginsInputValidator.name, (): void => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { WebSearchHelpers } from "../../../ts/helpers/web-search-helper";
import { Injector } from "../../../ts/injector";
import { WebSearchInputValidator } from "../../../ts/input-validators/web-search-input-validator";
import { dummyWebSearches } from "../test-helpers";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Injector } from "../../../ts/injector";
import { WebUrlInputValidator } from "../../../ts/input-validators/web-url-input-validator";
import { validUrls, invalidUrls } from "../test-helpers";

Expand Down
1 change: 0 additions & 1 deletion src/tests/unit/search-engine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { SearchEngine } from "./../../ts/search-engine";
import { CountManager } from "../../ts/count-manager";
import { FakeCountRepository } from "./fake-count-repository";
import { Count } from "../../ts/count";
import { defaultConfig } from "../../ts/default-config";

describe("SearchEngine", (): void => {
const threshold = 4; // same as default config
Expand Down
9 changes: 4 additions & 5 deletions src/tests/unit/user-input-history-manager.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { TestableUserInputHistoryManager } from "./testable-user-input-history-manager";
import { UserInputHistoryManager } from "../../ts/user-input-history-manager";

describe(TestableUserInputHistoryManager.name, (): void => {
describe("addItem", (): void => {
Expand Down Expand Up @@ -45,9 +44,9 @@ describe(TestableUserInputHistoryManager.name, (): void => {
const manager = new TestableUserInputHistoryManager();
manager.setHistory(history);

for (const historyItem of history) {
history.forEach(() => {
manager.getPrevious();
}
});

const actual = manager.getPrevious();

Expand Down Expand Up @@ -95,9 +94,9 @@ describe(TestableUserInputHistoryManager.name, (): void => {
manager.setHistory(history);
manager.setIndex(-1);

for (const historyItem of history) {
history.forEach(() => {
manager.getNext();
}
});

const acutal = manager.getNext();

Expand Down
2 changes: 1 addition & 1 deletion src/ts/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { app, BrowserWindow, globalShortcut, ipcMain, Menu, MenuItem, Tray, screen } from "electron";
import { app, BrowserWindow, globalShortcut, ipcMain, Menu, Tray, screen } from "electron";
import { autoUpdater } from "electron-updater";
import { join } from "path";
import { FilePathExecutionArgumentValidator } from "./execution-argument-validators/file-path-execution-argument-validator";
Expand Down

0 comments on commit 580a592

Please sign in to comment.