1
0
mirror of https://github.com/eleith/emailjs.git synced 2024-06-28 09:39:02 +00:00

test: always close server

This commit is contained in:
Zack Schuster 2020-07-27 02:10:34 -07:00
parent 0d7ffa210d
commit 10cfc1a2b9
2 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,9 @@ async function send(headers: Partial<MessageHeaders>) {
test.before(async (t) => {
server.listen(port, t.pass);
});
test.after(async (t) => {
server.close(t.pass);
});
test('client invokes callback exactly once for invalid connection', async (t) => {
t.plan(1);

View File

@ -79,6 +79,9 @@ function validate(headers: Partial<MessageHeaders>) {
test.before(async (t) => {
server.listen(port, t.pass);
});
test.after(async (t) => {
server.close(t.pass);
});
test('simple text message', async (t) => {
const msg = {