netlify-local
netlify-local copied to clipboard
Add tests
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
It'd be great to also add integration tests or maybe skip those and add functional ones (could have caught things like #9)