(options: SetupParams)
| 27 | } |
| 28 | |
| 29 | export async function inspectMongo(options: SetupParams): Promise<any> { |
| 30 | const { connectionString, dirname } = options |
| 31 | |
| 32 | const db = mongo.createConnection(connectionString) |
| 33 | |
| 34 | const inspectPath = path.join(dirname, 'setup') |
| 35 | const { inspect } = require(inspectPath) |
| 36 | |
| 37 | const result = await inspect(db) |
| 38 | await db.close() |
| 39 | return result |
| 40 | } |
| 41 | |
| 42 | export async function tearDownMongo(options: SetupParams) { |
| 43 | const { connectionString } = options |