Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('is a singleton', () => {
let repo = require('sourced-repo-mongo')
let todoListRepository2 = require('repos/todoListRepository.mjs').todoListRepository
let todoListRepository3 = require('repos/todoListRepository.mjs').todoListRepository
expect(repo.Repository).toHaveBeenCalledTimes(1)
expect(todoListRepository).toBeDefined()
expect(todoListRepository).toBe(todoListRepository2)
expect(todoListRepository2).toBe(todoListRepository3)
})
})