mongodoki
Version:
A tool to on-the-fly run MongoDB as a Docker Container, data restoring included
24 lines (23 loc) • 780 B
TypeScript
import { Db } from 'mongodb';
import { TestDoki, TestDokiOptions } from './doki';
export { Db } from 'mongodb';
export declare class MongoDoki extends TestDoki {
protected opts: TestDokiOptions;
constructor(opts?: TestDokiOptions);
/**
* Start a mongo container, connect to a db and return a Promise for a mongo driver Db instance.
* @param containerName
* @param dbName
* @param timeout
* @param dbDumpPath
*/
getDB(dbName?: string, timeout?: number, dbDumpPath?: string): Promise<Db>;
/**
* Import DB dump data through mongorestore
* @param dumpDirPath
* @param timeout
*/
private importDBData;
}
export declare const Mongodoki: typeof MongoDoki;
export declare type DokiConfiguration = TestDokiOptions;