nordcloud / lambda-wrapper

Wrapper for running lambda modules locally during development
MIT License
30 stars 17 forks source link

Adding a "silent" option #14

Open ChristopheBougere opened 7 years ago

ChristopheBougere commented 7 years ago

Hi,

What do you think about adding a silent option to run()? I'm using lambda-wrapper via serverless-jest-plugin, and I would like to see only jest output, and node the lambda output...

Does it make sense? Any idea on how I could do that?

Thanks

jeremydaly commented 7 years ago

+1 for this. I've tried the following for serverless with mocha, but it feels very hacky:

let logger = console.log

beforeEach(function() {
  // Suppress logging
  console.log = function() {}
});

Then after the wrapper promise resolves:

console.log = logger
simlu commented 6 years ago

You should take a look at https://github.com/simlu/lambda-tdd

Still early in development but so far it's working great.