You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
411 B

import mongoose from 'mongoose'
import MongooseDatabase from '../src/database'
import Resource from '../src/resource'
describe('Database', () => {
describe('#resources', () => {
let resources: Resource[]
beforeEach(() => {
resources = new MongooseDatabase(mongoose.connection).resources()
})
it('return all resources', () => {
expect(resources.length).toEqual(3)
})
})
})