Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Latest commit

 

History

History
16 lines (11 loc) · 560 Bytes

CONTRIBUTING.md

File metadata and controls

16 lines (11 loc) · 560 Bytes

Contributing

Testing

t.teardown() step

Many tests for this module require an http server. It is recommend to use a teardown method to safely close the server(s) and fetch clients. Additionally, due to the way http servers are closed in Node.js, you should close the fetch clients first then the http server(s). Furthermore, the server.close method is not promised based so in order to use it with await, use the closeServer utility method.

For example:

t.teardown(async () => {
	await fetch.close()
	await closeServer(server)
})