Skip to content

Is it possible to test middleware #22

@newmanw

Description

@newmanw

Examples are stubbing out the entire mongoose model and seem to be preventing middleware from being called. Is it possible to test mongoose middleware while mocking?

SomeSchema.pre('save', function(next) {
  // doing some pre save stuff here that I would like to test
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions