ForestAdmin/lumber

View on GitHub
test-fixtures/mongo/simple-model.js

Summary

Maintainability
A
0 mins
Test Coverage
const { ObjectID } = require('mongodb');
const _ = require('lodash');

const persons = [
  {
    _id: ObjectID(),
    name: 'James Cameron',
  },
];

const films = [
  {
    _id: ObjectID(),
    title: 'Terminator',
    author: _.find(persons, { name: 'James Cameron' })._id,
  },
];

module.exports = { films, persons };