netlify / netlify-lambda

Helps building and serving lambda functions locally and in CI environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running tests/CI suite

Tyler-Churchill opened this issue · comments

I may be missing an obvious configuration option.

For running this server for testing, how would one ensure that the webpack watch stops executing so everything can exit correctly?

I can add a pull request that adds another cli command, something like start:ci or something like that.

If you absolutely need this, I recently created my own alternative, lambda-dev. Its main difference is that it's not Netlify-specific and doesn't read the netlify.toml file, but otherwise it similarly supports serving (with configurable prefix) and building through webpack/babel.

Since adding tests, I had to add support for controlling webpack's watch mode. I just released v1.4.0 and added a --watch false flag to disable watching.

commented

like @iiroj I've also created my own alternative 8eecf0d2/netlify-local which does read netlify.toml and now has an API for test runners which you can use to start / stop the Server and manage the Webpack build process.

See 8eecf0d2/netlify-local#6 for more about the API.

hi @Tyler-Churchill, sorry for the super delayed repsonse. i'm just picking up on all the issues now. will link to you from the readme but i have no official testing solution in the repo right now.