| 123456789101112131415161718192021222324252627 |
- /** **********************************************************
- * Caution
- *
- * Module aliases by compilerOptions.paths in tsconfig.json
- * are NOT available in setup scripts
- *********************************************************** */
- const gc = require('expose-gc/function');
- const mongoose = require('mongoose');
- const { initMongooseGlobalSettings, getMongoUri, mongoOptions } = require('~/server/util/mongoose-utils');
- mongoose.Promise = global.Promise;
- jest.setTimeout(30000); // default 5000
- beforeAll(async() => {
- initMongooseGlobalSettings();
- await mongoose.connect(getMongoUri(), mongoOptions);
- });
- afterAll(async() => {
- await mongoose.disconnect();
- gc();
- });
- module.exports = {};
|