Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newing a mongoose model object sems to throw an error #6

Open
mypark opened this issue Jan 3, 2015 · 1 comment
Open

newing a mongoose model object sems to throw an error #6

mypark opened this issue Jan 3, 2015 · 1 comment

Comments

@mypark
Copy link

mypark commented Jan 3, 2015

get a TypeError: object is not a function when trying to new a mongoose object.

Using the readme example, if you change it from User.createAndSave to new User({title:'Mr'}) it will throw a not a function error

@malcolmocean
Copy link

I had the same issue. I think this is a massive bug. Basically the creator of mongoose-mock appears to have confused the notions of Schema and Model. If I had more time, I might fix it with a pull-request, but I'm working on something that needs to be finished today, so I've switched to mockgoose instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants