Upload 4.8

This commit is contained in:
Andrew Trieu
2023-05-31 15:20:53 +03:00
parent 4dda427795
commit 31436ad7fa
4 changed files with 547 additions and 50 deletions

View File

@@ -0,0 +1,16 @@
const mongoose = require('mongoose')
const supertest = require('supertest')
const app = require('../app')
const api = supertest(app)
test('blogs are returned as json', async () => {
await api
.get('/api/blogs')
.expect(200)
.expect('Content-Type', /application\/json/)
})
afterAll(async () => {
await mongoose.connection.close()
})

View File

@@ -0,0 +1,3 @@
module.exports = () => {
process.exit(0)
}