1 parent 2545801 commit 8b416dcCopy full SHA for 8b416dc
test/server.test.js
@@ -140,6 +140,16 @@ describe("server", () => {
140
assert.equal(response.body.name,"FIRSTNAME LASTNAME");
141
});
142
143
+// 11.2
144
+it('should enable bodyParser middleware with "extended" set to false',async()=>{
145
+constserverFilePath=path.join(process.cwd(),"src","server.js");
146
+constserverFile=awaitreadFile(serverFilePath,"utf8");
147
+constbodyParserRegex=/app.use\((\s+)?bodyParser.urlencoded\({(\s+)?extended:false(\s+)?}\)(\s+)?\);/;
148
+assert.ok(
149
+serverFile.match(bodyParserRegex),
150
+"bodyParser middleware not found"
151
+);
152
+});
153
after(()=>{
154
server.close();
155
0 commit comments