Skip to content

Commit

Permalink
Configure winston logging when running terraform tests. (#1238)
Browse files Browse the repository at this point in the history
Otherwise warnings are printed about unconfigured transports.
  • Loading branch information
tasdomas authored Oct 26, 2022
1 parent cbfa46b commit 150a0eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/terraform.test.js
Original file line number Diff line number Diff line change
@@ -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(`
Expand Down

0 comments on commit 150a0eb

Please sign in to comment.