Skip to content

Commit 91fd74a

Browse files
committed
fix test
1 parent 0fe5ede commit 91fd74a

4 files changed

Lines changed: 874 additions & 1023 deletions

File tree

app/booklendings.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ router.get('', async (req, res) => {
4343

4444

4545
router.post('', async (req, res) => {
46-
let studentUrl = req.body.student;
47-
let bookUrl = req.body.book;
46+
const body = req.body || {};
47+
let studentUrl = body.student;
48+
let bookUrl = body.book;
4849

4950
if (!studentUrl){
5051
res.status(400).json({ error: 'Student not specified' });

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ module.exports = {
164164

165165
// This option allows use of a custom test runner
166166
// testRunner: "jasmine2",
167+
// testRunner: "jest-circus/runner",
167168

168169
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
169170
// testURL: "http://localhost",

0 commit comments

Comments
 (0)