Skip to content

Commit

Permalink
Changing erroneous test with newer versions of node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Apr 23, 2018
1 parent 82dfb2d commit 0d10f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test2.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const http2 = require("http2"),
});

router.onconnect = (req, res) => res.header("x-onconnect", "true");
router.use("/", (req, res) => res.send(req.method !== "OPTIONS" ? "Hello World!" : ""));
router.use("/", (req, res) => res.send("Hello World!"));
router.use("/json1", (req, res) => res.json({text: "Hello World!"}));
router.use("/json2", (req, res) => res.json("Hello World!"));
router.use("/empty", (req, res) => res.status(204).send(""));
Expand Down Expand Up @@ -55,7 +55,7 @@ describe("Valid Requests (HTTP2)", function () {
.expectHeader("cache-control", "no-cache")
.expectHeader("content-type", "text/plain")
.expectHeader("content-length", undefined)
.expectBody(/^$/)
.expectBody(/^Hello World!$/)
.end();
});

Expand Down

0 comments on commit 0d10f0c

Please sign in to comment.