aboutsummaryrefslogtreecommitdiff
path: root/src/routes.test.ts
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2022-04-06 02:04:06 +0000
committerKevin J Hoerr <kjhoerr@protonmail.com>2022-04-06 02:04:06 +0000
commitda1945e6163c4c5bd8a2fa121c8347ccea83ef0a (patch)
tree0ad80c1f938a398ab971ed9047f5bda214dcba56 /src/routes.test.ts
parentb4a0c697af48fcd4aeb10302a0e507e4e826803e (diff)
downloadao-coverage-da1945e6163c4c5bd8a2fa121c8347ccea83ef0a.tar.gz
ao-coverage-da1945e6163c4c5bd8a2fa121c8347ccea83ef0a.tar.bz2
ao-coverage-da1945e6163c4c5bd8a2fa121c8347ccea83ef0a.zip
Silence logs in unit tests
Diffstat (limited to 'src/routes.test.ts')
-rw-r--r--src/routes.test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/routes.test.ts b/src/routes.test.ts
index 8560f56..1a6032a 100644
--- a/src/routes.test.ts
+++ b/src/routes.test.ts
@@ -12,6 +12,17 @@ import winston from "winston";
dotenv.config();
+jest.mock("./util/logger", () => ({
+ __esModule: true,
+ default: () => ({
+ format: winston.format.combine(
+ winston.format.splat(),
+ winston.format.simple()
+ ),
+ transports: [new winston.transports.Console({ silent: true })],
+ }),
+}));
+
test("Environment variable HOST_DIR must be defined", () => {
expect(process.env.HOST_DIR).not.toBeUndefined();
});