()
| 7 | const client = new MongoClient(url, { useNewUrlParser: true }) |
| 8 | |
| 9 | export async function makeDb () { |
| 10 | if (!client.isConnected()) { |
| 11 | await client.connect() |
| 12 | } |
| 13 | return client.db(dbName) |
| 14 | } |
| 15 | |
| 16 | const commentsDb = makeCommentsDb({ makeDb }) |
| 17 | export default commentsDb |
no outgoing calls
no test coverage detected