A simple fixture loader for MongoDB on Node.js that uses JSON files to define test data. Version 0.14.0 is the latest stable release; the package appears to be in maintenance mode with no recent updates (last publish ~8 years ago). Key differentiators include easy document relationship management (referencing document IDs), support for loading from files or directories, built-in CLI tool, and helpers like clearAndLoad and addModifier. It uses the native MongoDB driver but is not promise-based — all APIs are callback-style.
npm install pow-mongodb-fixturesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, clears all existing data, and loads user fixtures using clearAllAndLoad.
Always provide a callback function to async methods, even if empty.
Wrap calls in your own promise or use util.promisify to convert to async/await.
Set safe: true if you need write acknowledgments, or remove the option to use default driver behavior.
Ensure you call connect() first: const fixtures = require('pow-mongodb-fixtures').connect('dbname');Start MongoDB (e.g., mongod) or check host/port in connect() call.
Provide a callback function as the last argument: load(data, function(err) { ... });