Skip to content

Commit 849727b

Browse files
committed
use serve test helper method. /cc @brandondees @tmornini
1 parent 3fe0f29 commit 849727b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

middleware/security.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
const
11-
{ test, fetch }
11+
{ test, fetch, serve }
1212
= require ('test')
1313

1414
, { Server }
@@ -21,7 +21,7 @@ test ('calling next middleware')
2121
test ('X-XSS-Protection: 1; mode=block', async t => {
2222

2323
const
24-
server = (new Server).serve ``
24+
server = serve ``
2525
, response = await fetch ('http://localhost:8181/')
2626

2727

@@ -43,7 +43,7 @@ test ('X-XSS-Protection: 1; mode=block', async t => {
4343
test ('X-Frame-Options: deny', async t => {
4444

4545
const
46-
server = (new Server).serve ``
46+
server = serve ``
4747
, response = await fetch ('http://localhost:8181/')
4848

4949

@@ -58,7 +58,7 @@ test ('X-Frame-Options: deny', async t => {
5858
test ('X-Content-Type-Options: nosniff', async t => {
5959

6060
const
61-
server = (new Server).serve ``
61+
server = serve ``
6262
, response = await fetch ('http://localhost:8181/')
6363

6464

@@ -73,7 +73,7 @@ test ('X-Content-Type-Options: nosniff', async t => {
7373
test ('Strict-Transport-Security', async t => {
7474

7575
const
76-
server = (new Server).serve ``
76+
server = serve ``
7777
, response = await fetch ('http://localhost:8181/')
7878

7979
, age = 60 * 60 * 24 * 365

0 commit comments

Comments
 (0)