aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2022-04-06 00:29:31 +0000
committerKevin J Hoerr <kjhoerr@protonmail.com>2022-04-06 00:29:31 +0000
commit3e2af75628f6ff8cfa79cf0f5a22c1102e9c30e5 (patch)
tree2e9321279748eb1b15110c8531649c02d777c2d1
parent8470f7e21f39860d4760aa34f6461b2a3fccc96f (diff)
downloadao-coverage-3e2af75628f6ff8cfa79cf0f5a22c1102e9c30e5.tar.gz
ao-coverage-3e2af75628f6ff8cfa79cf0f5a22c1102e9c30e5.tar.bz2
ao-coverage-3e2af75628f6ff8cfa79cf0f5a22c1102e9c30e5.zip
Remove unused code for testing logs
-rw-r--r--.yarnrc.yml1
-rw-r--r--src/routes.test.ts23
2 files changed, 1 insertions, 23 deletions
diff --git a/.yarnrc.yml b/.yarnrc.yml
index 09db4b9..c6087b4 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -1,4 +1,5 @@
enableTelemetry: false
+pnpEnableEsmLoader: false
logFilters:
- code: YN0062
diff --git a/src/routes.test.ts b/src/routes.test.ts
index 2633308..8560f56 100644
--- a/src/routes.test.ts
+++ b/src/routes.test.ts
@@ -8,7 +8,6 @@ import express from "express";
import dotenv from "dotenv";
import fs from "fs";
import path from "path";
-import { Writable } from "stream";
import winston from "winston";
dotenv.config();
@@ -25,28 +24,6 @@ test("HOST_DIR must be readable and writable", () => {
).not.toThrowError();
});
-let output = "";
-
-jest.mock("./util/logger", () => {
- const stream = new Writable();
- stream._write = (chunk, _encoding, next) => {
- output = output += chunk.toString();
- next();
- };
- const streamTransport = new winston.transports.Stream({ stream });
-
- return {
- __esModule: true,
- default: () => ({
- format: winston.format.combine(
- winston.format.splat(),
- winston.format.simple()
- ),
- transports: [streamTransport],
- }),
- };
-});
-
import { configOrError, persistTemplate } from "./config";
import loggerConfig from "./util/logger";
import routes from "./routes";