Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var Entity = require('sourced').Entity;
var log = require('debug')('sourced-repo-mongo');
var mongo = require('../mongo');
var sourcedRepoMongo = require('../index');
var Repository = sourcedRepoMongo.Repository;
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var _ = require('lodash');
var should = require('should');
/* Market model/entity */
function Market () {
this.orders = [];
this.price = 0;
Entity.apply(this, arguments);
}
jest.mock('models/TodoList', () => {
let Entity = require('sourced').Entity
class TodoList extends Entity {
constructor () {
super()
this.items = []
this.initialize = jest.fn()
this.addItem = jest.fn()
}
}
return { TodoList }
})
jest.mock('repos/todoListRepository', () => {
function Market () {
this.orders = [];
this.price = 0;
Entity.apply(this, arguments);
}