Skip to content

Commit 150a0eb

Browse files
author
Domas Monkus
authored
Configure winston logging when running terraform tests. (#1238)
Otherwise warnings are printed about unconfigured transports.
1 parent cbfa46b commit 150a0eb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/terraform.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
const winston = require('winston');
12
const { iterativeCmlRunnerTpl } = require('./terraform');
23

34
describe('Terraform tests', () => {
5+
beforeAll(() => {
6+
winston.configure({
7+
transports: [
8+
new winston.transports.Console({
9+
level: 'error',
10+
handleExceptions: true
11+
})
12+
]
13+
});
14+
});
15+
416
test('default options', async () => {
517
const output = iterativeCmlRunnerTpl({});
618
expect(JSON.stringify(output, null, 2)).toMatchInlineSnapshot(`

0 commit comments

Comments
 (0)