You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An unofficial package allowing you to create Node Server instances of your Zeit`@now/node` lambdas.
3
+
An unofficial package allowing you to create Node [`http.Server`](https://nodejs.org/api/http.html#http_class_http_server) instances of your [Zeit](https://zeit.co/)[`@now/node`](https://zeit.co/docs/builders#official-builders/node-js) lambdas.
4
4
5
-
Doing so allows you to write unit/integration tests for your routes.
5
+
Enables you to write unit/integration tests for your lambdas, or to perform manual testing against a local server instance.
@@ -15,19 +15,67 @@ Doing so allows you to write unit/integration tests for your routes.
15
15
npm install zeit-now-node-server
16
16
```
17
17
18
-
### Example Jest Test
18
+
## Supported API
19
+
20
+
This package has taken the code from the official [`@now/node`](https://zeit.co/docs/builders#official-builders/node-js) builder in order to ensure maximum API compatibility. As far as I am aware we have 100% API coverage.
21
+
22
+
## Unit testing your lambdas
23
+
24
+
In the below example we will make use of a local server in order to perform an integration test against our lambda.
25
+
26
+
We will be making use of the [`test-listen`](https://github.com/zeit/test-listen) package, which accepts a [`http.Server`](https://nodejs.org/api/http.html#http_class_http_server) instance and will return a unique URL based on an available port.
27
+
28
+
We will also make use of [`axios`](https://github.com/axios/axios) in order to make the request against our lambda.
0 commit comments