Skip to content

Commit 67da2a8

Browse files
[mabel] Refactor to id variable
1 parent 44e3f89 commit 67da2a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

testing_example_1.test.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ describe("GET /books", () => {
2828
done();
2929
});
3030

31-
it("should get a book by id'", async done => {
31+
it("should get a book by id", async done => {
32+
const id = "3";
3233
const response = await request(app)
33-
.get("/books/3")
34+
.get("/books/" + id)
3435
.expect(200);
35-
expect(response.text).toEqual("You request information on book 3");
36+
expect(response.text).toEqual("You request information on book " + id);
3637
done();
3738
});
3839
});

0 commit comments

Comments
 (0)