From 8271fc4ac38367353f21efb6b19345cf19d89b52 Mon Sep 17 00:00:00 2001 From: Emanuele Libralato Date: Fri, 17 Jan 2020 13:38:38 +0100 Subject: [PATCH] refactor(test): added tslint rule + removed js Add the "tslint-no-focused-test" which fails if you leave *.only on a test. Remove some js tests which were committed by mistake. --- .../test/unit/src/logger/log-entry.js | 112 -------------- .../test/unit/src/logger/log-node.js | 29 ---- garden-service/test/unit/src/logger/logger.js | 54 ------- .../test/unit/src/logger/renderers.js | 53 ------- .../test/unit/src/logger/renderers.ts | 2 +- garden-service/test/unit/src/logger/util.js | 35 ----- .../logger/writers/basic-terminal-writer.js | 46 ------ .../logger/writers/fancy-terminal-writer.js | 47 ------ .../unit/src/logger/writers/file-writer.js | 31 ---- package-lock.json | 138 +++++++++--------- package.json | 1 + tslint.base.json | 6 +- 12 files changed, 79 insertions(+), 475 deletions(-) delete mode 100644 garden-service/test/unit/src/logger/log-entry.js delete mode 100644 garden-service/test/unit/src/logger/log-node.js delete mode 100644 garden-service/test/unit/src/logger/logger.js delete mode 100644 garden-service/test/unit/src/logger/renderers.js delete mode 100644 garden-service/test/unit/src/logger/util.js delete mode 100644 garden-service/test/unit/src/logger/writers/basic-terminal-writer.js delete mode 100644 garden-service/test/unit/src/logger/writers/fancy-terminal-writer.js delete mode 100644 garden-service/test/unit/src/logger/writers/file-writer.js diff --git a/garden-service/test/unit/src/logger/log-entry.js b/garden-service/test/unit/src/logger/log-entry.js deleted file mode 100644 index a01f246c15..0000000000 --- a/garden-service/test/unit/src/logger/log-entry.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const logger_1 = require("../../src/logger/logger"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("LogEntry", () => { - it("should dedent placeholder log entries", () => { - const ph1 = logger.placeholder(); - const ph2 = ph1.placeholder(); - const nonEmpty = ph1.info("foo"); - const nested = nonEmpty.info("foo"); - const nestedPh = nested.placeholder(); - const indents = [ - ph1.opts.indent, - ph2.opts.indent, - nonEmpty.opts.indent, - nested.opts.indent, - nestedPh.opts.indent, - ]; - chai_1.expect(indents).to.eql([-1, -1, 0, 1, 0]); - }); - it("should indent nested log entries", () => { - const entry = logger.info("hello"); - const nested = entry.info("nested"); - const deepNested = nested.info("deep nested"); - const deepDeepNested = deepNested.info("deep deep inside"); - const deepDeepPh = deepDeepNested.placeholder(); - const deepDeepNested2 = deepDeepPh.info(""); - const indents = [ - entry.opts.indent, - nested.opts.indent, - deepNested.opts.indent, - deepDeepNested.opts.indent, - deepDeepPh.opts.indent, - deepDeepNested2.opts.indent, - ]; - chai_1.expect(indents).to.eql([undefined, 1, 2, 3, 2, 3]); - }); - context("childEntriesInheritLevel is set to true", () => { - it("should create a log entry whose children inherit the parent level", () => { - const verbose = logger.verbose({ childEntriesInheritLevel: true }); - const error = verbose.error(""); - const silly = verbose.silly(""); - const deepError = error.error(""); - const deepSillyError = silly.error(""); - const deepSillySilly = silly.silly(""); - const levels = [ - verbose.warn("").level, - verbose.info("").level, - verbose.verbose("").level, - verbose.debug("").level, - verbose.silly("").level, - deepError.level, - deepSillyError.level, - deepSillySilly.level, - ]; - chai_1.expect(levels).to.eql([3, 3, 3, 4, 5, 3, 3, 5]); - }); - }); - describe("setState", () => { - it("should update entry state and optionally append new msg to previous msg", () => { - const entry = logger.info(""); - entry.setState("new"); - chai_1.expect(entry.opts.msg).to.equal("new"); - entry.setState({ msg: "new2", append: true }); - chai_1.expect(entry.opts.msg).to.eql(["new", "new2"]); - }); - }); - describe("setState", () => { - it("should preserve status", () => { - const entry = logger.info(""); - entry.setSuccess(); - entry.setState("change text"); - chai_1.expect(entry.opts.status).to.equal("success"); - }); - }); - describe("setDone", () => { - it("should update entry state and set status to done", () => { - const entry = logger.info(""); - entry.setDone(); - chai_1.expect(entry.opts.status).to.equal("done"); - }); - }); - describe("setSuccess", () => { - it("should update entry state and set status and symbol to success", () => { - const entry = logger.info(""); - entry.setSuccess(); - chai_1.expect(entry.opts.status).to.equal("success"); - chai_1.expect(entry.opts.symbol).to.equal("success"); - }); - }); - describe("setError", () => { - it("should update entry state and set status and symbol to error", () => { - const entry = logger.info(""); - entry.setError(); - chai_1.expect(entry.opts.status).to.equal("error"); - chai_1.expect(entry.opts.symbol).to.equal("error"); - }); - }); - describe("setWarn", () => { - it("should update entry state and set status and symbol to warn", () => { - const entry = logger.info(""); - entry.setWarn(); - chai_1.expect(entry.opts.status).to.equal("warn"); - chai_1.expect(entry.opts.symbol).to.equal("warning"); - }); - }); -}); -//# sourceMappingURL=log-entry.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/log-node.js b/garden-service/test/unit/src/logger/log-node.js deleted file mode 100644 index b81fd5964b..0000000000 --- a/garden-service/test/unit/src/logger/log-node.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const logger_1 = require("../../src/logger/logger"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("LogNode", () => { - describe("appendNode", () => { - it("should add new child entries to the respective node", () => { - logger.error("error"); - logger.warn("warn"); - logger.info("info"); - logger.verbose("verbose"); - logger.debug("debug"); - logger.silly("silly"); - const prevLength = logger.children.length; - const entry = logger.children[0]; - const nested = entry.info("nested"); - const deepNested = nested.info("deep"); - chai_1.expect(logger.children[0].children).to.have.lengthOf(1); - chai_1.expect(logger.children[0].children[0]).to.eql(nested); - chai_1.expect(logger.children[0].children[0].children[0]).to.eql(deepNested); - chai_1.expect(logger.children).to.have.lengthOf(prevLength); - }); - }); -}); -//# sourceMappingURL=log-node.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/logger.js b/garden-service/test/unit/src/logger/logger.js deleted file mode 100644 index d123cbc350..0000000000 --- a/garden-service/test/unit/src/logger/logger.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const log_node_1 = require("../../src/logger/log-node"); -const logger_1 = require("../../src/logger/logger"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("Logger", () => { - describe("findById", () => { - it("should return the first log entry with a matching id and undefined otherwise", () => { - logger.info({ msg: "0" }); - logger.info({ msg: "a1", id: "a" }); - logger.info({ msg: "a2", id: "a" }); - chai_1.expect(logger.findById("a")["opts"]["msg"]).to.eql("a1"); - chai_1.expect(logger.findById("z")).to.be.undefined; - }); - }); - describe("filterBySection", () => { - it("should return an array of all entries with the matching section name", () => { - logger.info({ section: "s0" }); - logger.info({ section: "s1", id: "a" }); - logger.info({ section: "s2" }); - logger.info({ section: "s1", id: "b" }); - const s1 = logger.filterBySection("s1"); - const sEmpty = logger.filterBySection("s99"); - chai_1.expect(s1.map(entry => entry.id)).to.eql(["a", "b"]); - chai_1.expect(sEmpty).to.eql([]); - }); - }); - describe("getLogEntries", () => { - it("should return an ordered list of log entries", () => { - logger.error("error"); - logger.warn("warn"); - logger.info("info"); - logger.verbose("verbose"); - logger.debug("debug"); - logger.silly("silly"); - const entries = logger.getLogEntries(); - const levels = entries.map(e => e.level); - chai_1.expect(entries).to.have.lengthOf(6); - chai_1.expect(levels).to.eql([ - log_node_1.LogLevel.error, - log_node_1.LogLevel.warn, - log_node_1.LogLevel.info, - log_node_1.LogLevel.verbose, - log_node_1.LogLevel.debug, - log_node_1.LogLevel.silly, - ]); - }); - }); -}); -//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/renderers.js b/garden-service/test/unit/src/logger/renderers.js deleted file mode 100644 index 86e7d8ea8c..0000000000 --- a/garden-service/test/unit/src/logger/renderers.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const logger_1 = require("../../src/logger/logger"); -const renderers_1 = require("../../src/logger/renderers"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("renderers", () => { - describe("renderMsg", () => { - it("should return an empty string if the entry is empty", () => { - const entry = logger.placeholder(); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal(""); - }); - it("should render the message with the message style", () => { - const entry = logger.info({ msg: "hello message" }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal(renderers_1.msgStyle("hello message")); - }); - it("should join an array of messages with an arrow symbol and render with the message style", () => { - const entry = logger.info({ msg: ["message a", "message b"] }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal(renderers_1.msgStyle("message a") + renderers_1.msgStyle(" → ") + renderers_1.msgStyle("message b")); - }); - it("should render the message without styles if the entry is from an intercepted stream", () => { - const entry = logger.info({ fromStdStream: true, msg: "hello stream" }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal("hello stream"); - }); - it("should join an array of messages and render without styles if the entry is from an intercepted stream", () => { - const entry = logger.info({ fromStdStream: true, msg: ["stream a", "stream b"] }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal("stream a stream b"); - }); - it("should render the message with the error style if the entry has error status", () => { - const entry = logger.info({ msg: "hello error", status: "error" }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal(renderers_1.errorStyle("hello error")); - }); - it("should join an array of messages with an arrow symbol and render with the error style" + - " if the entry has error status", () => { - const entry = logger.info({ msg: ["error a", "error b"], status: "error" }); - chai_1.expect(renderers_1.renderMsg(entry)).to.equal(renderers_1.errorStyle("error a") + renderers_1.errorStyle(" → ") + renderers_1.errorStyle("error b")); - }); - }); - describe("formatForTerminal", () => { - it("should return the entry as a formatted string with a new line character", () => { - const entry = logger.info(""); - chai_1.expect(renderers_1.formatForTerminal(entry)).to.equal("\n"); - }); - it("should return an empty string without a new line if the entry is empty", () => { - const entry = logger.placeholder(); - chai_1.expect(renderers_1.formatForTerminal(entry)).to.equal(""); - }); - }); -}); -//# sourceMappingURL=renderers.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/renderers.ts b/garden-service/test/unit/src/logger/renderers.ts index 38bd6cdc97..4448bb8b35 100644 --- a/garden-service/test/unit/src/logger/renderers.ts +++ b/garden-service/test/unit/src/logger/renderers.ts @@ -237,7 +237,7 @@ describe("renderers", () => { }) }) }) - describe.only("renderData", () => { + describe("renderData", () => { const sampleData = { key: "value", key2: { diff --git a/garden-service/test/unit/src/logger/util.js b/garden-service/test/unit/src/logger/util.js deleted file mode 100644 index 5a7b82def2..0000000000 --- a/garden-service/test/unit/src/logger/util.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const util_1 = require("../../src/logger/util"); -describe("util", () => { - describe("getChildNodes", () => { - it("should convert an n-ary tree into an ordered list of child nodes (skipping the root)", () => { - const graph = { - children: [ - { - children: [ - { - children: [ - { children: [], id: 3 }, - ], - id: 2, - }, - { children: [], id: 4 }, - { children: [], id: 5 }, - ], - id: 1, - }, - { - children: [], - id: 6, - }, - ], - id: 0, - }; - const nodeList = util_1.getChildNodes(graph); - chai_1.expect(nodeList.map(n => n.id)).to.eql([1, 2, 3, 4, 5, 6]); - }); - }); -}); -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/writers/basic-terminal-writer.js b/garden-service/test/unit/src/logger/writers/basic-terminal-writer.js deleted file mode 100644 index 03df5a18f3..0000000000 --- a/garden-service/test/unit/src/logger/writers/basic-terminal-writer.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const log_node_1 = require("../../../src/logger/log-node"); -const basic_terminal_writer_1 = require("../../../src/logger/writers/basic-terminal-writer"); -const logger_1 = require("../../../src/logger/logger"); -const renderers_1 = require("../../../src/logger/renderers"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("BasicTerminalWriter", () => { - describe("render", () => { - it("should return a formatted message if level is geq than entry level", () => { - const writer = new basic_terminal_writer_1.BasicTerminalWriter(); - const entry = logger.info("hello logger"); - const out = writer.render(entry, logger); - chai_1.expect(out).to.eql(renderers_1.formatForTerminal(entry)); - }); - it("should return a new line if message is an empty string", () => { - const writer = new basic_terminal_writer_1.BasicTerminalWriter(); - const entry = logger.info(""); - const out = writer.render(entry, logger); - chai_1.expect(out).to.eql("\n"); - }); - it("should return null if entry level is geq to writer level", () => { - const writer = new basic_terminal_writer_1.BasicTerminalWriter(); - const entry = logger.verbose("abc"); - const out = writer.render(entry, logger); - chai_1.expect(out).to.eql(null); - }); - it("should override root level if level is set", () => { - const writer = new basic_terminal_writer_1.BasicTerminalWriter({ level: log_node_1.LogLevel.verbose }); - const entry = logger.verbose(""); - const out = writer.render(entry, logger); - chai_1.expect(out).to.eql("\n"); - }); - it("should return an empty string if entry is empty", () => { - const writer = new basic_terminal_writer_1.BasicTerminalWriter(); - const entry = logger.placeholder(); - const out = writer.render(entry, logger); - chai_1.expect(out).to.eql(""); - }); - }); -}); -//# sourceMappingURL=basic-terminal-writer.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/writers/fancy-terminal-writer.js b/garden-service/test/unit/src/logger/writers/fancy-terminal-writer.js deleted file mode 100644 index 80fe133211..0000000000 --- a/garden-service/test/unit/src/logger/writers/fancy-terminal-writer.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const log_node_1 = require("../../../src/logger/log-node"); -const fancy_terminal_writer_1 = require("../../../src/logger/writers/fancy-terminal-writer"); -const logger_1 = require("../../../src/logger/logger"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("FancyTerminalWriter", () => { - describe("toTerminalEntries", () => { - const writer = new fancy_terminal_writer_1.FancyTerminalWriter(); - const verboseWriter = new fancy_terminal_writer_1.FancyTerminalWriter({ level: log_node_1.LogLevel.verbose }); - writer.stop(); - verboseWriter.stop(); - it("should map a LogNode into an array of entries with line numbers and spinner positions", () => { - logger.info("1 line"); // 0 - logger.info("2 lines\n"); // 1 - logger.info("1 line"); // 3 - logger.info("3 lines\n\n"); // 4 - const spinner = logger.info({ msg: "spinner", status: "active" }); // 7 - spinner.info({ msg: "nested spinner", status: "active" }); // 8 - const terminalEntries = writer.toTerminalEntries(logger); - const lineNumbers = terminalEntries.map(e => e.lineNumber); - const spinners = terminalEntries.filter(e => !!e.spinnerCoords).map(e => e.spinnerCoords); - chai_1.expect(lineNumbers).to.eql([0, 1, 3, 4, 7, 8]); - chai_1.expect(spinners).to.eql([[0, 7], [3, 8]]); - }); - it("should override root level if level is set", () => { - const entry = logger.verbose(""); - const terminalEntries = verboseWriter.toTerminalEntries(logger); - chai_1.expect(terminalEntries[0].key).to.eql(entry.key); - }); - it("should skip entry if entry level is geq to writer level", () => { - logger.verbose(""); - const terminalEntries = writer.toTerminalEntries(logger); - chai_1.expect(terminalEntries).to.eql([]); - }); - it("should skip entry if entry is empty", () => { - logger.placeholder(); - const terminalEntries = writer.toTerminalEntries(logger); - chai_1.expect(terminalEntries).to.eql([]); - }); - }); -}); -//# sourceMappingURL=fancy-terminal-writer.js.map \ No newline at end of file diff --git a/garden-service/test/unit/src/logger/writers/file-writer.js b/garden-service/test/unit/src/logger/writers/file-writer.js deleted file mode 100644 index 0a6580d3df..0000000000 --- a/garden-service/test/unit/src/logger/writers/file-writer.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -const chalk_1 = require("chalk"); -const stripAnsi = require("strip-ansi"); -const log_node_1 = require("../../../src/logger/log-node"); -const logger_1 = require("../../../src/logger/logger"); -const renderers_1 = require("../../../src/logger/renderers"); -const file_writer_1 = require("../../../src/logger/writers/file-writer"); -const logger = logger_1.getLogger(); -beforeEach(() => { - logger.children = []; -}); -describe("FileWriter", () => { - describe("render", () => { - it("should render message without ansi characters", () => { - const entry = logger.info(chalk_1.default.red("hello")); - chai_1.expect(file_writer_1.render(log_node_1.LogLevel.info, entry)).to.equal("hello"); - }); - it("should render error message if entry level is error", () => { - const entry = logger.error("error"); - const expectedOutput = stripAnsi(renderers_1.renderError(entry)); - chai_1.expect(file_writer_1.render(log_node_1.LogLevel.info, entry)).to.equal(expectedOutput); - }); - it("should return null if entry level is geq to writer level", () => { - const entry = logger.silly("silly"); - chai_1.expect(file_writer_1.render(log_node_1.LogLevel.info, entry)).to.equal(null); - }); - }); -}); -//# sourceMappingURL=file-writer.js.map \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a433b1c11f..da021ce7db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2878,28 +2878,28 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "", + "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "resolved": "", + "resolved": false, "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "", + "resolved": false, "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "optional": true, @@ -2910,14 +2910,14 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "", + "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "optional": true, @@ -2928,42 +2928,42 @@ }, "chownr": { "version": "1.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "", + "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "", + "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "4.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, @@ -2973,28 +2973,28 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "", + "resolved": false, "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "", + "resolved": false, "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "", + "resolved": false, "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, @@ -3004,14 +3004,14 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "", + "resolved": false, "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, @@ -3028,7 +3028,7 @@ }, "glob": { "version": "7.1.3", - "resolved": "", + "resolved": false, "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, @@ -3043,14 +3043,14 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "", + "resolved": false, "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "optional": true, @@ -3060,7 +3060,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "", + "resolved": false, "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, @@ -3070,7 +3070,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "", + "resolved": false, "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, @@ -3081,21 +3081,21 @@ }, "inherits": { "version": "2.0.3", - "resolved": "", + "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "resolved": "", + "resolved": false, "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "optional": true, @@ -3105,14 +3105,14 @@ }, "isarray": { "version": "1.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "", + "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "optional": true, @@ -3122,14 +3122,14 @@ }, "minimist": { "version": "0.0.8", - "resolved": "", + "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true, "optional": true }, "minipass": { "version": "2.3.5", - "resolved": "", + "resolved": false, "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, @@ -3140,7 +3140,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": "", + "resolved": false, "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, @@ -3150,7 +3150,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "", + "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "optional": true, @@ -3160,14 +3160,14 @@ }, "ms": { "version": "2.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true }, "needle": { "version": "2.3.0", - "resolved": "", + "resolved": false, "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, @@ -3179,7 +3179,7 @@ }, "node-pre-gyp": { "version": "0.12.0", - "resolved": "", + "resolved": false, "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, @@ -3198,7 +3198,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, @@ -3209,14 +3209,14 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": "", + "resolved": false, "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": "", + "resolved": false, "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, @@ -3227,7 +3227,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "", + "resolved": false, "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, @@ -3240,21 +3240,21 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "", + "resolved": false, "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "", + "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "optional": true, @@ -3264,21 +3264,21 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "", + "resolved": false, "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, @@ -3289,21 +3289,21 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "", + "resolved": false, "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "resolved": "", + "resolved": false, "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "optional": true, @@ -3316,7 +3316,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": false, "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true @@ -3325,7 +3325,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "", + "resolved": false, "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, @@ -3341,7 +3341,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": "", + "resolved": false, "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, @@ -3351,49 +3351,49 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "", + "resolved": false, "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "", + "resolved": false, "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.7.0", - "resolved": "", + "resolved": false, "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "optional": true, @@ -3405,7 +3405,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, @@ -3415,7 +3415,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "optional": true, @@ -3425,14 +3425,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "", + "resolved": false, "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.8", - "resolved": "", + "resolved": false, "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, @@ -3448,14 +3448,14 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "", + "resolved": false, "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "optional": true, @@ -3465,14 +3465,14 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "", + "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true, "optional": true }, "yallist": { "version": "3.0.3", - "resolved": "", + "resolved": false, "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true @@ -11067,6 +11067,12 @@ } } }, + "tslint-no-focused-test": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tslint-no-focused-test/-/tslint-no-focused-test-0.5.0.tgz", + "integrity": "sha512-YK0PSY5XAdJaTzVIXxnUGyvB5VAi+H9yTc3e40YVtu8Ix3+zLSz4ufvX6rXT3nWpim0DR6fxXoL/Zk8JI641Vg==", + "dev": true + }, "tslint-no-unused": { "version": "0.2.0-alpha.1", "resolved": "https://registry.npmjs.org/tslint-no-unused/-/tslint-no-unused-0.2.0-alpha.1.tgz", diff --git a/package.json b/package.json index 980217b6ee..f13f28fded 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "ts-node": "^8.5.2", "tslint": "^5.20.1", "tslint-microsoft-contrib": "^6.2.0", + "tslint-no-focused-test": "^0.5.0", "tslint-no-unused": "^0.2.0-alpha.1", "typescript": "^3.7.2", "typescript-formatter": "^7.2.2" diff --git a/tslint.base.json b/tslint.base.json index a0592e67a7..824b9dd03e 100644 --- a/tslint.base.json +++ b/tslint.base.json @@ -4,7 +4,10 @@ "tslint-plugin-prettier", "tslint-no-unused" ], - "rulesDirectory": ["node_modules/tslint-microsoft-contrib"], + "rulesDirectory": [ + "node_modules/tslint-microsoft-contrib", + "tslint-no-focused-test" + ], "rules": { "arrow-return-shorthand": true, "curly": true, @@ -27,6 +30,7 @@ "no-debugger": true, "no-eval": true, "no-floating-promises": true, + "no-focused-test": true, "no-invalid-this": true, "no-null-keyword": false, "no-shadowed-variable": true,