netlify-local icon indicating copy to clipboard operation
netlify-local copied to clipboard

Add tests

Open 8eecf0d2 opened this issue 5 years ago • 1 comments

Since the different Netlify Services aren't completely defined, testing will be based on current assumptions about how things should work. In addition to writing tests, adding more error handlers should be considered (eg, invalid webpack config).

Unit Tests

Config

  • [x] parseWebpackConfig()
  • [x] parseNetlifyConfig()

Webpack

  • [ ] Webpack.initialize()
  • [ ] Webpack.watch()
  • [ ] Webpack.build()

Server

  • [ ] Server.initialize()
  • [x] Server.listen()
  • [x] Server.close()
  • [x] Server.routeRedirects()
  • [x] Server.routeHeaders()
  • [x] Server.routeLambdas()
  • [x] Server.lambdaRequest()
  • [x] Server.lambdaContext()

Integration (sorta functional)

Redirects

  • [ ] Standard Redirect
  • [ ] Standard Rewrite
  • [ ] Proxy Rewrite
  • [ ] Placeholder (Path Params)
  • [ ] Placeholder (Query Params)
  • [ ] Force

8eecf0d2 avatar Oct 15 '18 21:10 8eecf0d2

It'd be great to also add integration tests or maybe skip those and add functional ones (could have caught things like #9)

8eecf0d2 avatar Oct 20 '18 22:10 8eecf0d2