Skip to content

pawap90/mongoose-literal-examples

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

A Node.js + Mongoose + Jest project that demonstrates how to use MongoDB's $literal operator to fix some common issues.

This repo was build as an example for my article Fixing MongoDB's error "'$' by itself is not a valid FieldPath".

Dependencies

What you need to run this project:

  • Node.js

(MongoDB is not required because it'll run in memory by the package mongodb-memory-server).

Try it out

1. Install dependencies

npm install

2. Run tests

npm test

Contribute

Feel free to contribute to this project either by leaving your comments and suggestions in the Issues section or creating a PR.

Testing MongoDB in memory

To learn more about how this project executes tests on a dynamically generated database in memory, check my article Testing Node.js + Mongoose with an in-memory database

About

A Node.js + Mongoose + Jest project that demonstrates how to use MongoDB's $literal operator to fix some common issues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published