There was an error while loading. Please reload this page.
1 parent 5371d9f commit a71f2faCopy full SHA for a71f2fa
test/server.test.js
@@ -129,6 +129,17 @@ describe("server", () => {
129
assert.equal(response.body.echo, randomWord);
130
});
131
132
+ // 10.1
133
+ it('should return `{ name: "FIRSTNAME LASTNAME" }` from GET requests to "/name?first=FIRSTNAME&last=LASTNAME"', () => {
134
+ return request(server)
135
+ .get("/name?first=FIRSTNAME&last=LASTNAME")
136
+ .expect("Content-type", /application\/json/)
137
+ .expect(200)
138
+ .then(response => {
139
+ assert.ok(response.body, "Body does not contain json");
140
+ assert.equal(response.body.name, "FIRSTNAME LASTNAME");
141
+ });
142
143
after(() => {
144
server.close();
145
0 commit comments