From 150a0eb5479e33877c670adb5ad88b3bd03d97d0 Mon Sep 17 00:00:00 2001 From: Domas Monkus Date: Wed, 26 Oct 2022 21:58:25 +0300 Subject: [PATCH] Configure winston logging when running terraform tests. (#1238) Otherwise warnings are printed about unconfigured transports. --- src/terraform.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/terraform.test.js b/src/terraform.test.js index 8299f0ba3..e61a72ff2 100644 --- a/src/terraform.test.js +++ b/src/terraform.test.js @@ -1,6 +1,18 @@ +const winston = require('winston'); const { iterativeCmlRunnerTpl } = require('./terraform'); describe('Terraform tests', () => { + beforeAll(() => { + winston.configure({ + transports: [ + new winston.transports.Console({ + level: 'error', + handleExceptions: true + }) + ] + }); + }); + test('default options', async () => { const output = iterativeCmlRunnerTpl({}); expect(JSON.stringify(output, null, 2)).toMatchInlineSnapshot(`